Barack Obama tried to lash out at Donald Trump while giving a speech at the international climate conference in Glasgow this week, but unfortunately for him, this backfired when he suffered a humiliating slip-up.

CNN reported that Obama slammed Trump for what he described as his “four years of active hostility towards climate science” while also lamenting that politics all over the globe is falling short of what needs to be done to save our planet.

“I recognize that we’re living in a moment when international cooperation has atrophied—in part because of the pandemic, in part because of the rise of nationalism and tribal impulses around the world, in part because of a lack of leadership on America’s part for four years on a host of multilateral issues,” Obama said.

“Of course, back in the United States, some of our progress stalled when my successor decided to unilaterally pull out of the Paris Agreement in his first year in office. I wasn’t real happy about that,” Obama continued in another dig at Trump.

Despite Trump,Trump, Obama added, “the American people met our original commitment under the Paris Agreement.”

“Not only that, but the rest of the world stayed in the deal,” he stated. “And now with President Biden and his administration rejoining the agreement, the US government is once again engaged and prepared to take a leadership role.”

However, Obama’s speech went off the rails when he mixed up Scotland and Ireland. Towards the end of his speech, Obama referred to the location by a common nickname for the wrong country.

“Since we’re in the Emerald Isles here, let me quote the bard, William Shakespeare,” Obama said, according to Fox News. “‘What wound,’ he writes, ‘did ever heal but by degrees.’”

The term “Emerald Isle” refers to Ireland, not Scotland as Obama tried to say. Making matters even worse, Shakespeare is England’s national bard, not Scotland’s.

Obama had been trying to direct this quote at young people, telling them that climate change “a marathon, not a sprint,” and that while they should “stay angry” and “frustrated,” they should know that “solving a problem this big, this complex and this important has never happened all at once.”

Unsurprisingly, Obama used the speech to encourage people to vote Democrat, saying, “Vote like your life depends on it, because it does.”

While most former presidents refrain from criticizing their successors publicly, Obama has attacked Trump time and time again since leaving office. Perhaps his flub during this speech was karma for his own classless actions.