The 2017 Oscars made history in more ways than one: Iranian filmmaker Asghar Farhadi stood up to Donald Trump with his very absence at the ceremony, Mahershala Ali became the first Muslim actor to win an Oscar, and Warren Beatty and Faye Dunaway announced the wrong Best Picture winner. The La La Land team was joyously celebrating on stage up until producer Jordan Horowitz corrected the error. The rightful winners, the cast and crew of Moonlight, rushed to the podium.

So how exactly did this mistake happen?

Quickly after the mix-up, people began searching for answers. A Medium post by the Academy itself appears to lend some insight. Brian Cullinan and Martha Ruiz, partners at professional services firm PricewaterhouseCoopers, are in charge of handling the briefcases containing the envelopes with the winners’ names on them. Cullinan explains:

“The producers decide what the order of the awards will be. We each have a full set. I have all 24 envelopes in my briefcase; Martha has all 24 in hers. We stand on opposite sides of the stage, right off-screen, for the entire evening, and we each hand the respective envelope to the presenter. It doesn’t sound very complicated, but you have to make sure you’re giving the presenter the right envelope.”

And apparently one of them did not hand Beatty and Dunaway the correct envelope. Right after the major flub, Beatty explained that the envelope the opened up had Emma Stone’s name and La La Land inside of it.

He said, “I want to tell you what happened. I opened the envelope and it said Emma Stone, La La Land. That’s why I took such a long look at Faye and at you. I wasn’t trying to be funny.”

So it looks like he and Dunaway were given the second card for the Academy Award for Best Actress, which Stone did win.

That being said, Beatty and Dunaway still made the egregious error of saying aloud that La La Land won even though there was some confusion.

At the end of the day, Moonlight took home the award. It might have been a major disservice that distracted people from the true winner, but it also sparked a hilarious meme.

A few hours after the mistake, PricewaterhouseCooper released a statement explaining the envelope mix-up.

It’s unclear whether the company will be granted the same responsibility next year.

Photos via Twitter, Getty Images / Kevin Winter