Out British actor Ian McKellen has apologized for saying that director Bryan Singer and actor Kevin Spacey sexually abused others because they were closeted.

The 79-year-old McKellen made his remarks during a recent appearance on the #QueerAF podcast.

“Most of them were in the closet,” McKellen said. “Hence, all their problems as people and their relationship with other people. If they had been able to be open about themselves and their desires, they wouldn't have started abusing people in the way they've been accused.”

Bryan Singer, 53, is openly bisexual. The director of Bohemian Rhapsody was fired from the film two weeks prior to the end of production over allegations of sexual abuse.

Kevin Spacey, 59, is facing a string of sexual misconduct allegations, which resulted in his firing from the Netflix drama House of Cards. Spacey responded to allegations made by actor Anthony Rapp in 2017 by announcing for the first time publicly that he is gay.

In a tweet, McKellen said that he was “wrong” and apologized.

“As part of an extended podcast recently, I suggested that if closeted people were instead open about their sexuality they wouldn’t abuse others. That, of course, is wrong,” he said. “My intention was to encourage the LGBT audience I was addressing to be proud and open about their sexuality. In doing so, my point was clumsily expressed. I would never, ever trivialize or condone abuse of any kind. I deeply regret my careless remarks and apologize unreservedly for any distress I caused.”