In an interview with Shortlist published Wednesday, out actor Ezra Miller said that he was told that coming out queer was a mistake.

“Folks in the industry, folks outside the industry. People I’ve never spoken to – they said there’s a reason so many gay, queer, gender-fluid people in Hollywood conceal their sexual identity, or their gender identity in their public image,” Miller said. “I was told I had done a ‘silly’ thing in … thwarting my own potential to be a leading man.”

Miller opened up about his sexuality in a 2012 interview with LGBT glossy Out shortly before The Perks of Being a Wallflower premiered. In Perks, Miller portrays a closeted gay young man.

“I was given a lot of stern talking-tos,” he said. “‘You’ve made a mistake’ is such a hard thing to hear. Maybe if I’d actually made a serious mistake? But not for this. I didn’t think I’d done anything wrong, though there have been moments of doubt as a result of those conversations. But … what they said was, in fact, rubbish.”

He added that he knows a lot of closeted people, which he said was “okay.”

Miller plays The Flash in Batman v. Superman: Dawn of Justice and the upcoming Justice League.