Though it turned out to be one of the most critically acclaimed television comedies of all time, earning a record-breaking 22 Primetime Emmy Award nominations in 2009 alone, life behind the scenes of 30 Rock wasn’t always a laugh riot. From cast changes to cancellation concerns, there was always something to make Tina Fey go blurgh—though nothing that a good (or even mediocre) sandwich couldn’t fix. Here are 30 things you might not know about Fey's quirky comedy.

1. It was supposed to be a show about news, not sketch comedy.

Fey originally pitched a show about a Bill O'Reilly-like news program, in which she'd play the producer. “The first pitch was not unlike The Newsroom on HBO,” she later told Rolling Stone. NBC Vice President Kevin Reilly told her she should use her time at SNL as inspiration, and although she was initially not into the idea—“it seemed so lazy to just write about writing”—she came around when she thought about casting Tracy Morgan. It didn’t hurt that they had Lorne Michaels’ blessing, who had signed on to executive produce Fey’s show.

2. 30 Rock wasn’t the first choice for the title.

The show was originally going to be called Rock Center. Fey preferred the title The Peacock, but NBC didn’t want them to mock the company logo.

3. No one involved expected Alec Baldwin to accept a starring role.

NBC

Fey created the character of Jack Donaghy for Baldwin, but she never thought he'd actually do the show; she didn’t even reach out to him before holding auditions for the part. But Baldwin happened to be hosting SNL around that time, so Fey and Michaels mentioned the part to him. "I cannot believe we got him," she said at a Paley Center for Media panel. One of the main reasons that Baldwin accepted was the promise of a four-day weekend. As the actor told Salon:

It was about Lorne Michaels, after my divorce, saying, “Come do this and I will make this palatable for your schedule,” because I had an obligation to fly out to L.A. to see my daughter every other weekend. This was seven years ago. Back then my daughter was 9 ... [It] was primarily about Lorne saying, “I will protect your schedule and you will not lose any time with your daughter. Come do this show.” And I really needed a harbor at that time. The idea of flying around and making my visitation with my daughter dependent on the whims of a film producer was always excruciating ... I had an almost inconceivably advantageous schedule at '30 Rock.' I always shot Tuesdays, Wednesdays, Thursdays, and had a four-day weekend to see my daughter.

4. Baldwin based Jack Donaghy on Lorne Michaels.

Fey denies that the Liz-Jack relationship was based on her relationship with Michaels—but Baldwin took inspiration from him anyway. He told NPR that "Professionally, [Jack is] a prototype of several GE executives, but in his personal life, he's Lorne Michaels. As I always say, 'Lorne is someone who has a tuxedo in the glove compartment of his car.' And Lorne is a friend, and I adore Lorne. But we do stick it to Lorne a lot.”

5. The writers struggled to create the Jack-Liz relationship.

Fey said at a Paley Center event that the Liz and Jack relationship was a tough dynamic to define, but that the writers landed on “somewhere between Mary Tyler Moore and Lou Grant and Han Solo and Princess Leia.”

6. Romance between Jack and Liz was never an option.

Many wondered what would come of the relationship between Jack and Liz, but showrunner and writer Robert Carlock has stated that the writers never planned to explore any romance between the two characters.

7. Rachel Dratch was supposed to play Jenna.

Fey’s fellow SNL alum, Dratch, was originally cast in the part of Jenna DeCarlo (her last name was changed to Maroney when they hired Jane Krakowski). "I think the big thing was—at least what they told me—that at first they wanted to have more comedy sketches in the show," Dratch told New York Magazine. "Then they decided they weren’t going to focus on the sketches, so they needed more of a sitcom actress, as opposed to a character actress." Dratch did go on to play around 10 different characters throughout 30 Rock’s run.

8. Tracy Morgan was friends with his on-screen entourage.

Morgan and Grizz Chapman, who played Grizz, were friends in real life before being cast on the show, and Kevin Brown, who played Dot Com, was once Morgan’s manager. “The chemistry you see on camera—that's what it is," Chapman told CNN. "What you see on camera—that's just friends, so that's why it comes across so well on TV.”

9. Jon Hamm auditioned for the part of Jack.

Though he didn’t get the role, Hamm went on to play one of Liz’s love interests, Dr. Drew Baird. "A lot of times when we’re writing we’ll have an actor in mind and we’ll keep referring to them," Fey told Entertainment Weekly. "Like for this [role] we said, 'Then Hamm comes in, blah blah blah.' And I kept saying, 'You know, you guys, we probably aren’t going to get Jon Hamm.' But we were lucky with the timing because Mad Men was on hiatus and he was hosting SNL. So I called over there and asked them [whispering], 'Hey, is that guy funny? Tell me the truth.' And they were like, 'Yes, he’s really funny.' By Saturday I knew they were right."

10. Donald Glover was a writer for the show.

Before he starred on Community or made it big as a rapper, Glover was a very young writer for 30 Rock. "Donald started right out of college as a writer at 30 Rock," Fey told Entertainment Weekly. "He was actually still, I believe, living in an NYU dorm. He was an RA, and he would work and go home to a dorm." Glover made brief appearances in a few episodes, then returned to play young Tracy Jordan in a live episode. That Tracy Morgan impression also came in handy when the crew asked him to record the extended version of “Werewolf Bar Mitzvah.”

11. Judah Friedlander brought his personal style to the part of Frank.

NBC

When Friedlander was cast as TGS writer Frank, he insisted on bringing his own look to the part. According to Friedlander, “The character was not supposed to be wearing glasses or a hat. But you know, before doing 30 Rock I’d done lots of movies, and in a lot of those I completely changed my appearance as well as the way I talked ... So when I was doing this show, I told them, ‘I’ve gotta look like me.’ I’m still doing standup all the time, and my look is very particular to my standup act. It’s all interconnected.”

12. Morgan improvised a few of Tracy Jordan’s famous possessions.

In the second episode of season one, when Liz is surprised to learn that Tracy Jordan owns a yacht, Tracy responds, “I got a yacht. I got a solid gold jet ski, two Batmobiles, the AIDS monkey’s bones …” That part was scripted, but according to Fey, his line ended there, and they needed him to keep talking as his character rounded a corner. So he improvised a few additional items, like “the first moped,” “a pair of Rock Hudson's socks,” and “a pair of Bill Bixby’s glasses from when he used to be your best friend.”

13. Morgan was known for his improvising.

According to the other cast members, Morgan improvised quite frequently. Kevin Brown joked that it was because “he never looked at the script.” But, Morgan asserted, “I come from a standup background and the first three letters in the word funny are fun. So I always had fun with it and I guess I made it look easy. I made it look like I wasn't reading the script.”

14. Fey thought the show would get cancelled during season one.

In 2006, 30 Rock was often mentioned in the same sentence as Studio 60 on the Sunset Strip. They both premiered on NBC at around the same time and even had similar premises—both were peeks behind the scenes of a sketch comedy show. Many people wondered which would last. Meanwhile, Fey was busy thinking about whether 30 Rock was just too out there. Krakowski later recalled, “Today I was remembering Paul Reubens being on the show in season one. It had a real title ['Black Tie'], but I remember Tina was calling the episode 'Goodbye America' because she thought we wouldn't stay on the air after that one. That was the first time that we knew the show was not going to be normal.”

15. The show contained almost 10 jokes per minute.

NBC

The show was known for its fast-paced writing. In 2010, one blogger actually calculated how many jokes there were per minute in the show. They determined that there was an average of 9.57 jokes each minute.

16. The second season almost ended with Liz adopting a 12-year-old boy.

The writers toyed around with the idea of Liz adopting a kid early on in the show. But the adoption wouldn’t last long: they planned to have the child steal from Liz, then vanish. According to Entertainment Weekly, "NBC promised to promote the plot line over the summer. But that never happened, and the story was dropped."

17. Jenna and Pete almost dated.

Another planned plotline that didn’t happen: some interoffice romance between Jenna and Pete. A script even made it to the table read, but the writers eventually nixed it because they found it too weird and didn’t like the idea of Pete being unfaithful to his wife.

18. Fey’s husband, Jeff Richmond, composed the music for the show.

Richmond and Fey married in 2001 after meeting each other at The Second City in Chicago. They’ve managed to continue working together for much of their careers. In addition to composing the music for 30 Rock, Richmond produced the show and even made a few cameos. More recently, Richmond did the music for Fey’s latest producing effort, Unbreakable Kimmy Schmidt.

19. The show actually leaned conservatively.

NBC

Though the show was often considered leftist, the writers actually made an effort to have the conservative Jack Donaghy be correct more than liberal Liz Lemon. As Carlock explained to Rolling Stone, “It’s a lot more fun to let the conservative guy be right more because it’s contrary to what most TV shows are flogging. It’s fun to let Liz be a little less well-informed, but maybe a little more morally right, and Jack to be a lot more sophisticated.”

20. There were a few Easter eggs in Liz Lemon’s office.

Some of the items on the wall of Lemon’s office were personal to Fey. They included a few pictures of her daughter, a picture of Fey with Don Pardo, and Amy Poehler’s cover of BUST Magazine.

21. Fey used the real Jack McBrayer as inspiration for his character, Kenneth the page.

McBrayer loves to eat chickpeas out of a can, and he told Conan O'Brien that Fey made his character a fan of that snack as well. She used his quirks as inspiration for other characters, too: like McBrayer, Nancy Donovan (played by Julianne Moore) wrapped a can of Sprite in tin foil to keep it cold.

22. When Oprah guest starred, she accused Fey of working too hard.

Oprah made an appearance in season three, which was filmed in 2008. That happened to be the same time that Fey agreed to reappear on SNL to impersonate Sarah Palin (despite the fact that she hadn’t been a cast member on the show for years). Fey told The New York Times that when Oprah learned that Fey was going right from an all-day Saturday shoot to her first appearance as Palin on SNL, she said Fey might be overextending herself.

23. Christopher Cross was a fan of the show.

NBC

In the season four episode “Floyd,” Liz cries and sings a made-up Christopher Cross song. After watching the episode, Cross actually finished the song, then recorded a version of it and sent it to the crew. To return the favor, the writers named Liz’s last boyfriend “Criss Chros” after him.

24. There was a live stage show before the live episode aired.

In the fifth season, 30 Rock tackled its first live episode. But the cast had actually already done a live show during the Writers Guild of America Strike of 2007-2008. To raise money for the writers, they performed an already-aired episode in front of a live audience. Since they had a great time, they decided to write one to broadcast live.

25. Fey enlisted SNL experts to help with the live episode.

The live episode was filmed on the SNL set in front of an audience. They also hired Beth McCarthy-Miller, who directed SNL for 11 years, to direct the episode and ensure all of the live aspects went off without a hitch.

26. Baldwin almost left the show after the fifth season.

He thought the writing and creativity had taken a downturn. "It was the low point," Baldwin told Rolling Stone. "Though even anemic 30 Rock writing is still better than everybody else's writing. I go, 'I'm going to get the f*** out of here, I'm done,' because I'm an employee, I don't have any say. So Season Five ends, and I'm saying 'Next year, I'm done,' then I come back, and Season Six is really good, we all had fun again." By the time the show ended, he was offering to take a pay cut for the show to continue.

27. Morgan had to take eight weeks off for an urgent kidney transplant in 2011.

Sherri Shepherd, who played Morgan's wife on the show, stepped in to star in a few episodes so that they could continue Tracy Jordan’s storyline while Morgan was on medical leave. And thus, the infamous “Queen of Jordan” episode was created in the style of The Real Housewives reality series.

28. To write the finale, the writers took inspiration from many sitcom finales.

They watched a handful of other television show finales on their lunch break, including the ones from The Mary Tyler Moore Show, Frasier, Cheers—and iCarly. "I was moved to tears by the iCarly finale," Fey told Entertainment Weekly. "It didn’t hold up in the room because they didn’t know the characters like I did. But that was another one where they really let people say goodbye!" Said Carlock, "It was very well done."

29. The writers didn't want to end the show with a Liz Lemon wedding.

NBC

This is why she got married halfway through the final season. Fey wanted her to “find happiness,” she told Entertainment Weekly, but didn’t want marriage to “be the accumulation of her time.”

30. Baldwin bought all of Jack’s suits when the show ended.

According to Tom Broecker, the show’s costume designer, Baldwin really liked his wardrobe on the show—enough to take the suits home when the series wrapped. "He wrote a big check to NBC," Broecker told Zap2It. "He likes his clothes and wants to look good."