A judge has dismissed charges against a man who arrested as part of a sting of an adult store.

In July, police in Hollywood, Florida, responded to an anonymous complaint about gay sex in the backroom of the Pleasure Emporium.

Police responded with an undercover sting. Two officers went to the Pleasure Emporium, paid $25 each to enter the backroom, walked under a giant neon sign that read “PRIVATE VIEWING,” watched gay men having sex in a room and then arrested 13 of them.

The men were prosecuted for indecent exposure in a public place, but Broward County Judge Ginger Lerner-Wren just ruled that the backroom of the Pleasure Emporium is not a public place.

“The court finds that the Pleasure Emporium is not a public space under [Florida Statute] 800.03,” she wrote, citing that the law specifically says it’s not a crime to expose oneself “in any place provided or set apart for that purpose.”

Related: Florida media outed 13 men by publishing their names & photos

She noted that the private rooms are separated from the public business area with several barriers, like a locked door, a sign that says the rooms are private, and the $25 fee.

“The patrons who access the private viewing theaters where consensual activity occurs in the presence of other consenting adults objectively and subjectively possess a reasonable expectation of privacy.”

The judge dismissed the charges against one of the men.

Miranda Grossman, a spokesperson for the Hollywood Police Department, said that they stand by their choice to raid the backroom.

“The Hollywood Police Department respectfully disagrees with the Judge’s interpretation,” she said, arguing that the backroom isn’t private because it’s open to anyone in the public who buys a ticket.

But that’s ignoring the purpose of the law. The state wants to prevent people from having sex in places where others might accidentally walk in and see them, since those people didn’t consent to viewing sex.

“It’s a place of business and you shouldn’t have to also be there and have to be there worried about people exposing themselves and performing sex acts,” Grossman said in July, to justify the sting.

It’s hard to imagine anyone being “worried” that they might see someone exposing themselves at the backroom of the Pleasure Emporium. That is, after all, why they paid $25 to be there.

And even if it were illegal, a misdemeanor like indecent exposure doesn’t justify publicly outing someone, like the Hollywood Police Department did when it sent the names and pictures of the men to the local media.

The lawyer of one of the men who was arrested told the Miami New Times that her client lost his job as a result of sting, and that he started having suicidal thoughts.

But the Hollywood Police Department stands by their decision to out the men.

“As a reporter I am sure you can understand releasing information related to criminal activity is in the public’s best interest,” Grossman told the New Times.

Rhonda Gelfman, a lawyer who is representing many of the men arrested in the sting, said that she will try to help those who pleaded guilty to something that the judge just ruled wasn’t even a crime.

“I’m happy with judge’s well-reasoned opinion and that justice was served,” Gelfman said. “I plan to now spend time assisting the others who had pleaded guilty to this case when they should not have.”