Modern Family star Jesse Tyler Ferguson came out to his parents after an embarrassing incident.

The 42-year-old Ferguson shared his coming out story as part of PEOPLE's Coming Out Stories video series.

When he was a freshman in high school, Ferguson was caught stealing porn from his local bookstore and his parents had to come get him.

“I shamefully showed them the magazines under my shirt and they took me into a backroom and I was held there and a police officer came and arrested me.” Ferguson said.“My mom and dad had to come to the store and they had to show them the ‘nature of the material’ I was stealing and that’s sort of how I came out. I find it funny now, but at the time it was incredibly traumatizing.”

“Ironically, my father still had a hard time catching up. I snuck some straight porn in there too, so that threw him off just enough,” said Ferguson, who added that he came out to his father three times.

In 2013, Ferguson married attorney Justin Mikita in New York City.

“I'm now married, and my father, who had such a hard time accepting my sexuality, danced at my wedding very happily,” Ferguson said.