Matthew Perry is still healing from a gastrointestinal perforation that left him bedridden for three months, but the 49-year-old Friends star has been released from the hospital and is focused on his recovery.

According to a source, “Matthew was very sick when he was hospitalized; his condition was very serious. A gastrointestinal surgery is very complex, and the healing can be complicated.”

Perry’s rep confirmed that the actor underwent surgery to repair a hole in his intestinal tract in August — and now a source says “he’s good,” adding that the star is “going home finally.”

According to healthline.com, a gastrointestinal perforation “occurs when a hole forms all the way through the stomach, large bowel, or small intestine. It can be due to a number of different diseases, including appendicitis and diverticulitis. It can also be the result of trauma, such as a knife wound or gunshot wound.”

Perry — who has always been open about substance abuse battles, including alcohol and Vicodin addiction — addressed his condition on Sept. 14 in his first tweet in six months: “Three months in a hospital bed. Check.”