President Donald Trump said on Wednesday that the media treated former National Security Adviser Michael Flynn “very unfairly” and slammed leaks by members of his own administration.

“General Flynn is a wonderful man. I think he’s been treated very, very unfairly by the media, as I call it the fake media, in many cases, and I think it is really a sad thing he was treated so badly,” Trump said during a joint press conference with Israeli Prime Minister Benjamin Netanyahu.

Trump called leaks from his administration “a criminal action” and claimed that they are being used to “cover up for” Hillary Clinton’s election loss.

“It has been going on for a long time before me, but now it’s really going on,” Trump said. “I think that it is very, very unfair what’s happened to General Flynn, the way he was treated and the documents and papers that were illegally, I stress that, illegally leaked.”

Flynn resigned as national security adviser late Monday, days after reports revealed that he spoke about sanctions in a call with Russia’s ambassador to the United States before Trump’s inauguration.

This contradicted members of Trump’s administration, including Vice President Mike Pence, who previously denied that Flynn and the Russian ambassador discussed sanctions.

The New York Times and CNN reported on Tuesday, citing U.S. officials, that members of Trump’s campaign staff made contact with Russian officials several times before the 2016 election.