Fans of “Castle” were puzzled when ABC announced that Stana Katic would not be returning for the next season, which ultimately didn’t make any difference when the network cancelled the show shortly afterward.

ABC Entertainment president Merring Dungey met with reporters this morning during the network’s portion of the TV Critics Association press tour in Beverly Hills, and was asked about the logic behind firing an actor from a show that was going to be cancelled anyway.

RELATED: ‘Castle’ Stars Nathan Fillion And Stana Katic React To Series Finale

According to Dungey, however, the decision wasn’t as clear cut as you may think, with the studio that produces the show behind Katic’s dismissal, not the network, in order to cut costs in advance should the show be picked up for another season.

“That’s a case where you have things running on sort of two parallel tracks,” Dungey said. “We were always very up-front with the studio and the producers about the possibility that we might not be bringing the show back for season nine, but the studio has to do what they need to do in order to prepare for the possibility of season none.”

She added: “So they did what they felt they needed to do in order to be ready if they did get the nod. Ultimately for us at the network, we did not feel that it was the right thing to do to order another season.”