Cut FBI Director Christopher Wray some slack. The Trump appointee inherited a host of problems from his predecessor, James Comey, and it seems Comey is determined to make those problems worse.

Within hours of the release of Inspector General Michael Horowitz’s report on the FBI’s Foreign Intelligence Surveillance Act warrant abuses, Comey had an opinion article up at the Washington Post, in which he denied any wrongdoing, deception, or political bias.

The report, however, tells a much different story, citing “at least 17 significant errors or omissions” that raise “significant questions regarding the FBI chain of command’s management.”

Wray acknowledged these “serious performance failures” in an interview with ABC News, but pushed back on the GOP’s characterization of the FBI as a “deep state” institution.

“I think that’s the kind of label that’s a disservice to the men and women who work at the FBI who I think tackle their jobs with professionalism, with rigor, with objectivity, with courage,” Wray told ABC News. “So that’s not a term I would ever use to describe our workforce, and I think it’s an affront to them.”

This didn’t sit well with President Trump, who took to Twitter to slam Wray’s unhelpful “attitude.”

“I don’t know what report current Director of the FBI Christopher Wray was reading, but it sure wasn’t the one given to me,” Trump tweeted. “With that kind of attitude, he will never be able to fix the FBI, which is badly broken despite having some of the greatest men & women working there!”

But Wray isn’t the problem. In fact, he’s simply doing what any good boss would do: He’s defending his employees and reiterating his intent to right the ship that had begun to sink long before he took the helm.

If anything, Horowitz’s report confirms that Comey was the problem all along. Trump was right to fire him: He’s a self-important, manipulative man who has no problem bending the rules to advance his agenda.

When confronted, Comey always has an excuse. Indeed, when an earlier inspector general concluded that Comey had acted in an “insubordinate” manner when he “intentionally concealed” his plans to exonerate Hillary Clinton during a press conference, Comey responded with a New York Times piece under the headline, “This Report Says I Was Wrong. But That’s Good for the F.B.I.”

And earlier this summer, Horowitz’s office said Comey set a “dangerous example” for the bureau when he intentionally leaked confidential conversations he had with Trump. Horowitz recommended that Comey be prosecuted, but because Comey’s conversations with Trump had not been legally classified, Comey dismissed the report as defamation.

“I don’t need a public apology from those who defamed me, but a quick message with a ‘sorry we lied about you’ would be nice,” Comey tweeted in August.

This time around, Comey is clinging to Horowitz’s conclusion that serious political bias did not taint the FBI’s investigation into the 2016 Trump campaign’s alleged ties to the Kremlin.

“So it was all lies. No treason. No spying on the campaign. No tapping Trumps wires. It was just good people trying to protect America,” Comey wrote on Twitter.

There might not have been overt bias (a conclusion the Justice Department has disputed), but there was significant irresponsibility and mismanagement, both of which can be traced back to one person: James Comey.

Indeed, it was Comey who pushed to include the faulty Steele dossier in the FBI’s FISA warrant application, despite the fact that the CIA had dismissed it as an unverified report filled with “internet rumors.” It was Comey who ignored the many reports of Steele’s political ties to Hillary Clinton and the Democratic National Committee. It was Comey who installed a mole in the White House to feed the FBI information about Trump and his aides in 2017 — an operation that was “in direct conflict with the no-contact policy between the White House and the department of Justice,” according to one former National Security Council official.

Comey’s self-righteous behavior has set a horrible precedent for the FBI and the rest of the intelligence community. It now falls to Wray to clean up the mess Comey has created, and to do that, he’ll need all the help he can get.