Oscar host Jimmy Kimmel has explained a joke that he was going to do at the Oscars but had to scrap thanks to Envelopegate.

After the top category was announced Kimmel was going to make fun of Matt Damon, who was in the audience. However the late-night host had to cut the joke after La La Land was accidently announced as the winner of Best Picture instead of Moonlight.

"The plan for the last joke was — the Best Picture winner is announced, they make a speech. I was assuming the Best Picture was not going to be Manchester by the Sea. I said to [Matt], 'If it's not Manchester by the Sea I'm going to be sitting next to you and it's going to be my revenge for the Emmys,'" Kimmel said on Bill Simmons podcast.

He went on to say, "I'd be sitting next to him and it would start on me. I'd start wrapping the show up, but then the camera would widen and we’d see that Matt would be sitting next to me. I would say, 'Well, you know, it's unbelievable, you know Casey [Affleck] won and Kenneth [Lonergan] won (for Best Screenplay). There’s only one person who didn’t win tonight and it's you.' It would have been a nice little button to the whole night."

Damon, who was a producer on Manchester by the Sea, made fun of Kimmel at the 2016 Emmys. He mocked the late-night host after he lost the Emmy for Outstanding Variety Talk series to John Oliver, according to US Weekly.

"I missed the last category. Did you win? That's a bummer," he said. "Oh, hey, Jimmy, tell your mom I like dem apples."

Damon was the one who told Kimmel that the wrong movie had been announced for Best Picture. We'll have to wait and see if and when Kimmel gets back at Damon since it didn't happen at the Oscars.