The pitfalls of live television in the era of social media continue: Comedian Howie Mandel found himself in hot water Tuesday night over an ill-conceived bulimia joke on a live episode of NBC’s America’s Got Talent that sparked immediate backlash on social media. Mandel shared his suspicion that the joke would likely not go well but proceeded with it anyway. Capping a rousing judge reaction to the act of a fan favorite, The Regurgitator (Stevie Starr), who swallows objects and then regurgitates them, Mandel said, “this would probably come out wrong, but you, sir, make bulimia entertaining.”

The live telecast went into commercial right after but some time later, Mandel preempted his critique of another act to deliver his mea culpa. “I just want to take a second to apologize,” the comedian said. “I made a comment earlier, it’s live television, I wasn’t thinking. I made light of bulimia, which is a very serious eating disorder and mental health issue. I deal with mental health all the time, and I did something stupid. I should never make light of it. I apologize to anybody that was offended. I’m not perfect, I make mistakes.”

Mandel, who has spoken publicly of his own struggles with OCD and other disorders, later repeated his apology on Twitter.