WASHINGTON (AP) — It’s exceedingly improbable, but not completely farfetched: Dismayed Republicans could still dump Donald Trump and find a different presidential nominee at their national convention next month.

Once viewed as a political joke, the blunt-spoken billionaire has stormed to the cusp of becoming the GOP nominee. He has more than enough delegates to be formally anointed at the party’s gathering in Cleveland.

But Trump’s recent disparagement of a judge, claiming he was incapable of impartially hearing a Trump lawsuit because he is Mexican-American, has triggered talk of replacing Trump. Republicans were already divided over his past comments about Hispanics, women and others, and some leaders like House Speaker Paul Ryan, R-Wis., are backing Trump but labeling his remark “racist.”

Here’s the scenario for derailing Trump and why it’s unlikely — at least now:

THE MATH

Trump has 1,542 delegates, according to The Associated Press’ count, including 1,447 required by current GOP rules to vote for him at the convention. That’s well above the 1,237 delegates needed for the nomination and more than double the 559 of his nearest rival, Texas Sen. Ted Cruz.

Measured another way, Trump has amassed 13.4 million votes in primaries, well above Cruz’ 7.7 million.

Those numbers add up to one word: Winner.

THE PROBLEM

Some Republicans think Trump can’t win and will drag down the party’s congressional and other candidates with him. Senate control, and less likely the House, are at also stake in November’s election.

Such talk is limited, at least publicly. But it’s out there.

Sen. Jeff Flake, R-Ariz., said this week that Trump’s denigration of the judge “might spur” talk of finding a different nominee. He noted that Trump’s 70th birthday is approaching and said, “It’s tough to change. And he certainly hasn’t shown any signs that he’s going to.”

“What does Trump have to do or say for the party to disassociate itself from him?” asked Rory Cooper, senior adviser to the Never Trump political committee.

And conservative talk radio host Hugh Hewitt said on his show that Trump should be dropped because “the plane is headed toward the mountain.”

THE CURE

One way to stop someone from winning a game is to change the rules.

Mechanically, if not politically, that’s possible in Cleveland next month. The procedures governing the convention will be whatever a majority of its 2,472 delegates approve.

Current rules, which they seem likely to adopt, give the nomination to whoever wins a majority of their votes.

GOP rules experts say that to block Trump, one option is to set a higher threshold than he currently can reach, such as requiring a two-thirds margin.

That would only be needed for the first ballot. If no candidate wins the nomination by then, most delegates are free to vote for anyone in the second and succeeding rounds of voting.

Another option: Let all delegates immediately support whoever they’d like.

Though it’s widely disputed, some say current rules already let delegates support whomever they please. That would mean no changes would be needed.

“The primaries are baloney” and award candidates “bragging rights,” not committed delegates, said Curly Haugland of North Dakota, a member of the Republican National Committee.

THE PROBLEM WITH BLOCKING TRUMP

As torn as the GOP is, many believe booting him is politically unrealistic because it would intensify the party’s rifts and is probably impossible.

“It’s too late,” said Trump detractor and former presidential contender Sen. Lindsey Graham, R-S.C. James Bopp Jr., an Indiana convention delegate and rules expert, says disregarding Trump’s primary victory and naming a different nominee would mean “the destruction of the Republican Party.”

Rep. Tom Cole, R-Okla., said talk of ditching Trump at the convention was a “Washington fantasy” that would look like the party was “trying to undo the will of the Republican electorate” and pull off “some sort of coup.”

BUT WAIT

If Trump has a majority of delegates, does he really have to worry about rules changes that could deny him the nomination?

Probably not. But maybe.

That’s because by party bylaws, delegates are free to vote however they want on the rules, platform and challenges to delegates’ credentials. The only thing most must do is support the candidate they are pledged to, and only on the first round of votes.

The danger for Trump: Many of his delegates — the numbers are unclear — actually prefer Cruz or perhaps other alternatives. If they’re persuaded to do so, perhaps by additional intemperate Trump comments, they can vote for rules changes that would open the door for a replacement.

But many say Trump has the delegates needed to prevail.

“It’s just not going to happen,” said Randy Evans, a GOP national committeeman from Georgia.

Trump aides did not respond to emails and phone messages requesting comment.

Asked Thursday if he was open to the convention picking a different candidate than Trump, Cruz said, “I’m going to leave political punditry to the people who get paid to do it.”

Cruz spokeswoman Catherine Frazier said the senator did not favor a challenge to Trump, saying, “The voters made their decision.”