The Biggest Loser trainer Bob Harper suffered from a heart attack that left him unconscious for two days, PEOPLE confirms

Bob Harper is in recovery after suffering from a heart attack, PEOPLE confirms.

The 51-year-old Biggest Loser trainer and host was reportedly working out at a New York City gym two weeks ago when he collapsed. A doctor exercising at the gym performed CPR before Harper was moved to a nearby hospital, where he remained unconscious for two days, according to TMZ. He was released from the hospital after an eight day stay.

Get push notifications with news, features and more.

The personal trainer, who has a series of workout DVDs and online programs on Daily Burn, along with his work on The Biggest Loser, said that his heart attack was due to genetics, and his mom died early from a heart attack.

Harper posted a photo of a candle on Instagram last Wednesday, with the caption, “My word of the day… LUCKY.”

Harper became the host of The Biggest Loser in Sept. 2015, ahead of the show’s 17th season. NBC has not announced the next season of the show at this time.