President Donald Trump cannot seem to suppress his contempt for the news media ― even when he is speaking about something completely unrelated.

In remarks to members of the United States military in Texas on Saturday, Trump singled out the Coast Guard for rescuing nearly 11,000 people stranded by Hurricane Harvey.

He then compared it to what he described as the relative lack of courage exhibited by journalists covering the storm.

“Think of it: almost 11,000 people ― by going into winds that the media would not go into. They will not go into those winds,” he said. “Unless it’s a really good story, in which case they will.”

Pres. Trump praises Coast Guard for saving people "by going into winds that the media would not go into...unless it's a really good story." pic.twitter.com/6JFH45o0wn — ABC News (@ABC) September 2, 2017

The media apparently considered Hurricane Harvey a “really good story” though, because numerous journalists put themselves in harm’s way to cover the disaster ― often accompanying the very service members Trump was thanking.

We were literally on the helicopter with them https://t.co/wc7BMZg6gc — Andy Campbell (@AndyBCampbell) September 2, 2017

In fact, many reporters, including HuffPost’s David Lohr, took part in rescue efforts as they encountered people struggling to survive the storm’s worst effects.

Trump has a famously rocky relationship with the news media, particularly national outlets, which he frequently derides as “fake news.” At a campaign-style rally in Phoenix, Arizona, on Aug. 22, Trump spent more than 10 minutes denouncing the media’s treatment of him, complete with indictments of specific journalists and their outlets.

During a visit to a shelter in Houston on Saturday, however, Trump struck a slightly more conciliatory tone. The Texans he met are “really happy” with the federal recovery efforts he is managing, Trump told reporters, adding that he was pleasantly surprised to find that even the news media was recognizing his work.

“It’s been very well received ― even by you guys, it’s been well received,” Trump said.

NICHOLAS KAMM/Getty Images President Donald Trump speaks with military personnel on Saturday, Sep. 2, 2017, before departing for Louisiana to continue his tour of areas affected by Hurricane Harvey.