Sean Hayes had a very serious health scare recently, but he's well enough now to joke about it with Ellen DeGeneres.

On Wednesday's Ellen, the Will & Grace star told the host about why he had to cancel his appearance on her show a couple of weeks ago: he was in the hospital because his small intestine burst. It's a rare condition that can be fatal if it's not dealt with quickly, but the pain Hayes was experiencing was so excruciating that he went straight to the hospital, where doctors put a "chip clip" in his guts to keep him together.

Hayes, of course, is laughing through the pain, and he had Ellen in stitches as he told the story of talking to her producer about rescheduling and about his hospital gown "bum wrap."

We're glad Sean Hayes is okay and already back to making us laugh.

Will & Grace airs Thursdays at 9/8c on NBC.