"Castle" threw fans for a loop at the end of its two-part season premiere when Kate walked out on her marriage to Rick. The decision even had star Nathan Fillion scratching his head.

"I looked at our showrunners [Alexi Hawley and Terence Paul Winter] and I said, 'How are you going to sell that?'" Fillion told Headlines & Global News exclusively at The Paley Center for Media's Dr. Horrible's Sing-Along Blog Reunion on Saturday. "They reassured me that it was going to be fine, that they were looking to do a couple things. One is bring the fun back to 'Castle.'"

Fillion has always considered the ABC show more of a comedy with dramatic parts rather than a straight drama and the goal is to bring back the fun seen in the earlier seasons. One way Hawley and Winter are doing that is reintroducing the back and forth between Castle and Beckett (Stana Katic), building theory while working cases together as they struggle to find their way back to each other.

"The other thing [the showrunners] said was, 'We really want to get back to that thing where people are rooting for this couple. Where it gets them all worked up again," Fillion said. "And I think job well done."

Beckett will call in a favor to her estranged husband on Monday night's episode when she needs someone with resources and contacts in city hall. Det. Ryan (Seamus Dever) can't help but suggest Castle, who got his original ride-along assignment because of his close relationship with the mayor.

Watch the sneak peek for "What Lies Beneath" below.

"Castle" airs on Mondays at 10 p.m. on ABC.