An Uber driver, who was caught with upskirt videos of his passengers on his phone, was sentenced to two months imprisonment by a Hong Kong court Thursday.

The incident came to light after police stopped 44-year-old old Wong Yiu-long’s car for a breathalyzer test in September and noticed a phone live-streaming upskirt footage of his sleeping passenger. Police then discovered two pinhole cameras hidden at the rear of the car’s front seats. The driver was immediately taken into custody.

During investigation, officers found nearly 900 upskirt videos on the phone, including 13 videos of passengers. When questioned, Yiu-long told the officers that he made the videos out of curiosity and that it was for his private collection. He also admitted to looking at the live stream of the recording when he stopped at traffic signals.

Earlier in March, Yio-long, a married man with a son, pleaded guilty to the crime and was charged with “committing an act outraging public decency.”

uber Uber signage is seen outside the entrance of the ride-hailing giant's office in Hong Kong, March 10, 2017. Photo: ANTHONY WALLACE/AFP/Getty Images

During the hearing Thursday, Yiu-long’s defense attorney Debora Poon Suk-ying said his client was ashamed and had conveyed his apology to the victims and his family, the South China Morning Post reported.

Suk-ying added that his client, a former logistics company supervisor, had taken up driving part time to get some extra income in order to repay his debts. He added that Long made the mistake of filming his passengers as he had not had physical relations with his wife for over a decade.

“He came to his senses the moment he was caught,” he said, adding his client was declared bankrupt and had to sell the car after the incident came to light.

His defense counsel also asked for a non-custodial sentence, arguing Yiu-long had cooperated with police during investigation. Principal Magistrate Winnie Lau Yee-wan, however, said the accused had planned the offense and in order to protect women, he had to be sentenced immediately.

In addition to the prison sentence, Yiu-long was also fined for not having the required car hire permit.