Ratings declined this season, as the show shifted focus and brought on Kevin James' former "King of Queens" partner Leah Remini.

A year ago, Kevin James told a reporter that his CBS sitcom, “Kevin Can Wait,” had killed off Erinn Hayes’ character on the show in order to give the show a longer life. Last week, CBS canceled the sitcom after two seasons.

On Wednesday, CBS execs admitted that the choice to make James’ character a widower didn’t go over well with viewers. “Creatively, the show made a choice at the beginning of last year,” said CBS Entertainment senior executive vice president Thom Sherman. “We agreed to go along with it and unfortunately the audience didn’t respond to it.”

CBS first revealed the storyline last summer during the Television Critics Association press tour, after the choice was made to bring James’ “The King of Queens” co-star, Leah Remini, on “Kevin Can Wait” full time.

As part of a massive shift when “Kevin Can Wait” returned for its sophomore run, about 10 months passed since Hayes’ character’s death, allowing for James’ character to have moved on.

According to James, speaking to the New York Daily News in October, the thought process behind Donna’s departure was to bring a new direction to the show, one that would allow for it to run for more seasons and be “lengthier.”

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

James said at the time that the original idea for his character was to be portrayed as a single father, but the show later made the decision to add a wife character.

But this past season, with Hayes gone, and the well-publicized decision to have her character die, ratings dropped. “It was a strong show for us, and it had a lot of decline this year, it was headed in the wrong direction,” said CBS Entertainment president Kelly Kahl. “The numbers were going down. Looking forward it didn’t look like a show that could anchor a night for us.”

Sign Up: Stay on top of the latest breaking film and TV news! Sign up for our Email Newsletters here.