A man in British Columbia has been found guilty of driving while on his phone, despite the phone’s dead battery and proper storage in a cubby hole.

On Oct. 12, 2018, Patrick Henry Grzelak was driving home from work in Surrey, B.C., when he was ticketed for using his cellphone because he had earbuds in both his ears.

The phone’s battery was dead and the phone itself was stored in a cubby hole on the front dashboard, according to the decision in B.C. provincial court, released on Monday.

Justice Brent Adair ruled that even though Grzelak was not holding the device, the earbuds should be considered part of the phone when plugged in.

“In my view, by plugging the earbud wire into the iPhone, the defendant had enlarged the device, such that it included not only the iPhone (proper) but also attached speaker or earbuds,” Adair wrote.

“Since the earbuds were part of the electronic device and since the ear buds were in the defendants ears, it necessarily follows that the defendant was holding the device (or part of the device) in a position in which it could be used.”

Adair also cited a case from 2015 in which the court rejected the notion that a driver holding a phone with a dead battery should not be considered for a ticket.

“Simply holding the device in a position in which it may be used constitutes the offence, even if it is temporarily inoperative,” she wrote.

In British Columbia, electronic devices must only be used while driving in a hands-free manner and the device must be affixed to the car. A violation of the law carries a fine of $368 and four demerit points. Fines can increase to $2,000 for repeat offenders.

A message to Grzelak was not immediately returned.

This story has been corrected as an earlier version misidentified the justice on the case.