Jason Segel once made a jibe at How I Met Your Mother, only for the joke to eventually be incorporated into season 9. While best known for playing the lovable Marshall Erikson in HIMYM, Jason Segel also has a successful film career and has appeared in several Judd Apatow comedies. Although incredibly grateful for the sitcom, Segel wasn’t always keen on staying with How I Met Your Mother for the show's full nine years.

Created by Carter Bays and Craig Thomas, How I Met Your Mother aired on CBS from 2005-2014. The story focuses on Ted Mosby’s (Josh Radnor) search for the future mother of his children, aided by his best friends. Jason Segel’s Marshall is Ted’s closest companion since college, alongside his long-term girlfriend Lily Aldrin (Alyson Hannigan). Throughout the show, Marshall receives various strong arcs involving his relationship, the conflict between being a well-played corporate lawyer or an environmentalist and grieving over the loss of his father.

Related: What Jason Segel Has Done Since How I Met Your Mother

Marshall was one of the most beloved characters, due to his many quirks and good-natured persona. It’s difficult to imagine HIMYM without Segel, but, back in 2010, he was worried he didn’t have much left to give the character. Speaking to GQ, he voiced concern that Marshall would eventually become the butt of lazy, overly broad humor like eating an entire cake by himself. Funnily enough, he repeated these comments in a film cameo before Segel's cake jibe was referenced in HIMYM season 9’s “Vesuvius”.

HIMYM: Wedding Bride Narshall Cake Joke

Segel expressed to GQ that working on HIMYM was “an amazing place to be”. However, his comments came at a time when he was signed on for another three years, taking him to How I Met Your Mother season 8, and he was also trying to further his film career. Segel wrote and starred in 2008’s Forgetting Sarah Marshall and was currently working on The Muppets. He continued, “I don’t really feel like I have much more to offer with this character. Maybe if we got divorced or something – but that’s not gonna happen.” Although Marshall and Lily broke up briefly in the first season, nobody would ever expect their sweet (if very co-dependent) marriage to come to an end in HIMYM season 9. Instead, he was concerned another scenario would occur: “My TV wife opens the fridge, and she’s like, “What happened to the birthday cake?” And I walk in with a little frosting here [points to the corner of his mouth] like, “What birthday cake?” His cake jibe was then reiterated during a cameo in This Is The End (2013), when he complains to Kevin Hart about working on a sitcom for so long.

Luckily, HIMYM’s creators weren’t offended by Segel’s jibe. Responding to a query about Segel’s This Is The End cameo on Reddit, Bays replied, “I loved that movie, and that scene was great. And I don’t want to give anything away, but keep watching.” He is referring to “Vesuvius”, in which the group watches The Wedding Bride sequel. Marshall is shocked to find himself parodied as Narshall (Jon Heder), best friend of Jed Mosely (Chris Kattan).  He is grossly offended when a guilty Narshall appears with frosting on his mouth, having devoured Jed’s chocolate cake. The joke plays out almost exactly as Segel described in 2010, with Marshall claiming it’s “insulting and ridiculous”. He threatens to sue the filmmakers, until Robin points out said cake incident did happen some years back, offscreen. Marshall begrudgingly relents, claiming Ted should have put a note on the cake to ward him off.

Segel was likely relieved that How I Met Your Mother season 9 created some interesting family conflict for Marshall, as accepting a judgeship threatened to derail Marshall and Lily’s planned move to Rome. Much of his story was also filmed separately, perhaps to accommodate Segel’s film schedule. Fortunately, Jason Segel’s How I Met Your Mother cake jibe became a fun in-joke, with the reference clearly demonstrating the bond between the show’s cast and crew.

Next: Why How I Met Your Mother Accidentally Created A Jason Segel Paradox