"Kevin Can Wait" star Kevin James is finally talking about what led to the sudden death of Erinn Hayes' character, Donna.

Leah Remini Reunites With Kevin James On Screen

James told the New York Daily News that the decision did not have anything to do with Hayes, but because they were out of story ideas.

“I get that people are like, ‘Whoa, why would you do this?’ But it really felt like a thing like this was needed for this show to drive forward,” he said.

According to James, the show was initially meant to portray him as a single father, but he and producers decided to write in a wife and three children. For the show to live beyond the first two seasons, things apparently needed to change.

>> On Rare.us: Leah Remini says the Church of Scientology wanted her to convert Kevin James

“The plot of the show didn’t have enough drive,” James said. “If we got through a second season, I wouldn’t see us getting through a third one. We were literally just running out of ideas.”

James' former TV wife from "King of Queens," Leah Remini, has since signed on as a series regular.

After Remini's character was announced, Hayes took to Twitter to let fans know that she was out.

"True, I've been let go from the show," she wrote. "Very sad, I had a great experience season 1. Thank you for all the support from our wonderful fans."

>> See the tweet here