The bad news is that Donald Trump is the most incompetent president in modern American history. The good news is that Donald Trump is the most incompetent president in modern American history.

He was too incompetent to understand his own health care bill, or accurately describe the direction in which the “armada” designed to intimidate North Korea was heading, or restrain himself from disclosing highly classified information to Russian Foreign Minister Sergei Lavrov and Russian Ambassador Sergei Kislyak. But he’s also too incompetent, it appears, to destroy liberal democracy.

When Trump fired James Comey a week ago, many Republicans denied that he had done so to shut down the FBI’s inquiry into his campaign’s Russia ties. Trump, they said, could not have been that stupid. He could not have been stupid enough to believe that firing Comey would quash the Russia investigation.

But, increasingly, it appears that Trump was. Rather than building a high-minded pretext for firing Comey, Trump, according to the New York Times, invited Comey to dinner in January and demanded his personal loyalty. If that wasn’t incriminating enough, in February he baldly asked Comey to end the investigation into former National Security Advisor Michael Flynn. Then, after Comey asked for more funding to investigate the Trump campaign’s Russia ties, Trump fired him—essentially asking the man he had handed a loaded gun to fire it at his head.

In the hours after Comey’s firing, the “Trump can’t be that stupid” caucus globbed onto Deputy Attorney General Rod Rosenstein’s memo, which offered justifications for Comey’s firing that did not reek of self-interest. But in an interview with NBC News’ Lester Holt, Trump admitted that he was thinking about the Russia investigation when he made the decision to fire Comey, thus discarding Rosenstein’s fig leaf and exposing his political nakedness for all to see.

Thank goodness. The Kremlin, it turns out, is not the only institution able to outwit Donald Trump. American law enforcement and the American press can too. Comey, who unlike Trump knows the art of political CYA, reportedly kept a record of the President’s efforts to obstruct justice. Trump’s own White House is sabotaging him daily through massive leaks. And at both the Times and the Washington Post, the best reporters of their generation are participating in the journalistic equivalent of a dunking contest.

In retrospect, it was predictable. During the campaign, Trump advertised his hostility to liberal democratic norms. But he advertised his incompetence too. He slandered judges for their ethnicity and vowed tax investigations into the publishers of newspapers that criticized him. But he also let Texas Senator Ted Cruz give a prime time speech at his own convention that did not include an endorsement.

As a result of his own ineptitude, Trump is politically weaker than he was on Inauguration Day even though the economy is stronger. And it’s harder to mount a populist assault on the rule of law when you’re not even that popular.

Yes, Trump can still do grave damage. Yes, he’s exposed the fragility of America’s system of liberal democracy. But that system has one key advantage: The people protecting it are good at their jobs.