Magnum Ice Cream has apologized for an ad that describes same-sex hugs as a “guilty pleasure.”

In the ad, which ran in the UK on Spotify, a man says: “A hug from my boyfriend, that's my guilty pleasure. Because in my country, just a simple hug with the man I love could send me to prison for more than 10 years.”

Some people on social media criticized the ad, saying that the company was comparing eating ice cream to being imprisoned for being a sexual minority.

Magnum initially defended the ad, saying it was “to remind people that what is considered a guilty pleasure isn't always what you would expect.”

In a statement to the UK edition of The Huffington Post, Magnum apologized.

“Magnum has a history of championing LGBTQ+ rights and Pride Month is a moment when lots of us celebrate progress. We’re sorry for any offence caused by the advert, which aimed to bring awareness to the injustices people still face around the world,” the company said.