It’s no secret that Game of Thrones is arguably the biggest show on television. Yes The Walking Dead gets bigger numbers, but in terms of buzz, passion, and yes, controversy, Game of Thrones dominates the zeitgeist with each new season. However, you may not know that HBO’s mega-hit almost burst into flames before it even got off the ground.

When creators David Benioff and D.B. Weiss got the go-ahead to make a pilot for an adaptation of George R.R. Martin’s sweeping fantasy series, HBO enlisted Tom McCarthy—the filmmaker behind The Station Agent and Best Director Oscar nominee for this year’s Spotlight—to take the helm. However, their conception of the pilot was all wrong, and the final result was, Weiss and Benioff admit, a total disaster. For example, the original pilot had failed to make clear that Jamie and Cersei are brother and sister—a pretty important piece of information for the audience to have, especially given how the episode ends.

Ultimately they recast a few roles (Jennifer Ehle originally played Catelyn Stark) and underwent significant reshoots with director Tim Van Patten, resulting in the final pilot we saw make it to air—which, to be honest, isn’t entirely great itself, but considering how awful it was in the first place, I guess it’s something of a minor miracle.

Weiss and Benioff have told the story behind their first screening of the original pilot before, at which time their friend, screenwriter Craig Mazin, chimed in with a very blunt reaction that made them realize just how much trouble they were in. But the two recently appeared on Mazin and writer John August’s podcast Scriptnotes, where the original pilot was a main topic of discussion.

Speaking on the podcast (via Vanity Fair), Weiss looked back in agony on that first screening:

“Watching them watch that original pilot was one of the most painful experiences of my life. As soon as it finished, Craig [Mazin] said, ‘You guys have a massive problem.’”

Indeed, Benioff remembers these words all too well:

“I was taking notes and I had this yellow legal pad, and I just remembered writing in all caps, ‘MASSIVE PROBLEM,’ and it’s all I could think about the rest of the night. Craig didn’t really have any great ideas except that he said ‘change everything.’”

Mazin, meanwhile, went on to say how shocked he was when Benioff and Weiss were able to salvage the pilot after significant reworking:

“I will never forget being invited to the premiere of the first season. I went in just thinking (skeptically), ‘Well, I guess we’ll just see how this goes.’ I sat there and this show unfolds and I am stunned. Stunned. And I very specifically remember walking out and I said to [Weiss and Benioff], ‘That is the biggest rescue in Hollywood history.’ Because it wasn’t just that they had saved something bad and turned it really good. You had saved a complete piece of shit and turned it into something brilliant. That never happens!”

The rest, as they say, is history. The full podcast episode is worth a listen, as Benioff and Weiss get candid about their sometimes contentious working relationship and Weiss’ sneaky way of always winning arguments. With only a couple more seasons left before the show wraps up, the upcoming sixth season should make for a fascinating turn as the showrunners start to build towards the series’ grand finale. Game of Thrones returns to HBO on April 24th.