A Wisconsin man's plan to use a shoe camera to take photographs up women's skirts was foiled this week when the battery exploded, injuring the man and causing him to rethink his pervy plan.

“When the explosion happened, he got treatment for minor burns, then disclosed what happened to his mentor, a clergyman,” Madison police officer David Dexheimer told the Wisconsin State Journal. The clergyman told him to visit the police.

Taking upskirt photos without a subject's consent is a felony under Wisconsin law, carrying a penalty up to "3½ years of combined prison and extended supervision," according to the Journal.

The man had not managed to take any illicit pictures before his gear self-destructed, which means that he hadn't actually committed a crime. So the police explained the serious consequences of taking the creepy photos and then sent him on his way.

The Journal notes that the proliferation of small, cheap portable cameras has made illicit upskirt photos a growing problem. Wisconsin is one of just many jurisdictions that ban the practice. Massachusetts, Georgia, and Texas recently passed upskirt legislation, while New York and Virginia have longstanding bans in place.

But not every state has upskirting laws. Alabama, for example, has no such law, though legislators there considered adopting one this year.