BALTIMORE -- Bernie Sanders came to a poor black neighborhood here for a photo op. He left with a PR problem.

The Vermont senator and Democratic presidential hopeful toured the Sandtown-Winchester neighborhood on Tuesday – where Freddie Gray was arrested earlier this year – to highlight racial injustice. “Anyone who took the walk that we took around this neighborhood would not think you’re a wealthy nation, you would think you’re in a third-world country,” he said.

Sanders spent about 25 minutes walking past boarded-up houses surrounded by an enormous mass of reporters who swarmed to capture images of the presidential candidate among the urban blight. But back at a community center, where Sanders met with black pastors before a press conference, what stood out from the day was the unusual request from his spokesperson: “Stay on topic,” Symone Sanders asked. “Don’t ask about ISIS. It’s not on topic.”

No one seemed eager to ask about the terror group (Donald Trump’s proposal to ban Muslim immigrants was the topic du jour). But now feeling compelled, a CNN reporter asked if Sanders was trying to avoid the topic. “You want to ask me about ISIS?” Sander bristled, flanked by black pastors. “We will talk about ISIS,” he replied tersely before quickly leaving the podium and ending the press conference.

Sanders’ flash of anger made headlines and threatened to overshadow the substance of the event. “Pastors wanted to make sure the topic of the day did not get lost. I asked press to stay on topic at a presser & they troll me,” Symone Sanders tweeted in defense.

Frustration with the press may be longstanding for Sanders, but it’s particularly acute now that the political discussion has moved to the less friendly terrain of national security, revealing the limitations of a candidate who has spent decades honing a single message he is reluctant to change. One of Sanders’ biggest strengths is his consistency, but it comes with an inflexibility that can makes him appear brittle.

It’s not uncommon for Sanders to scold reporters for asking about topics he deems unserious. And Sanders wants to be the only one who can determine which topics qualify as serious, and are thus fair game, and which don’t – a luxury never afforded to presidents. “The American people, I think, increasingly understand that corporate media is prepared to discuss everything 24 hours a day, seven days a week, except the most important issues facing the American people,” Sanders said in New Hampshire in August.

“This is nothing new for him,” said Steven Rosenfeld, a former Vermont journalist who served as press secretary on Sanders’ successful 1990 congressional campaign. “Bernie wants to talk about what Bernie wants to talk about and nothing else, especially when it comes to the media’s questions.”

Distrust of the mainstream media has been a leitmotif of Sanders’ political career since at least 1976, when he was quoted in the Rutland Herald declaring that the “the three major networks are controlled by the Chase Manhattan Bank.”

His feuds with the Vermont press corps are legendary. There was the time he marched a visiting “60 Minutes” film crew into the offices of the Associated Press, which he felt had treated him unfairly, to flip the tables and ask them tough questions; there was the time he had his press secretary send a letter to every editor in the state making it clear he did not like the editor of the St. Albans Messenger; and there was the time he told the editor of the Burlington Free Press to “go f*** [him]self” as Sanders stormed out of an editorial board meeting.

Chris Graf, who used to run the AP’s Vermont bureau, recalled this year to the Burlington altweekly Seven Days that Sanders dislikes the media at “probably at about the same level” as he dislikes billionaires.

But in the heady days of the summer, the media was an invaluable asset to Sanders, chronicling his meteoric rise in the polls, propagating images of his enormous rallies in liberal enclaves to voters in early nominating states and, perhaps most importantly, pressing Hillary Clinton daily over her use of private email server while secretary of state.

While Clinton was lassoing reporters in New Hampshire and going lengthy stretches without taking questions from her traveling press corps, Sanders was generally accessible. While he chafed at the repeated questions about Clinton and had little patience for the horse race, his frustration generally manifested itself in the endearing grumpiness of someone who cares about the issues. He was a happy warrior.

But the media giveth, and the media taketh.

As Sanders became a legitimate top-tier candidate, more critical questions and stories naturally followed as the press performed its traditional role of vetting presidential candidates. In the late fall, his momentum stalled as he seemed to bump up against his natural ceiling of support, leading to more negative process stories.

Then, after the Paris terror attack, the issue terrain dramatically shifted against him. No longer were economic and social issues the only ones on the minds of Democrats. But instead of adapting, Sanders resisted the turn, hoping to wrench the conversation back to his serious issues.

This weekend while campaigning in New Hampshire, Sanders wove jabs at the “establishment media” into his usual attacks on “establishment politics” as he made it clear he would not dramatically change which issues he discussed. “Don’t let CNN or NBC or anybody tell you what the major issues are,” he said to cheers.

His supporters love his consistency and willingness to stick it to the corporate media. Trust in media is at an all time low, so he’s clearly not alone. But resistance to discuss issues beyond the ones he’s comfortable addressing may help explain why he’s had trouble winning over Democrats outside his natural base.

In Baltimore, Sanders wanted to talk about racial justice, which is ironic since the issue was foisted upon him earlier this year by Black Lives Matter activists who repeatedly interrupted Sanders events. At the time, he primary viewed racial inequality through the lens of economic injustice. His campaign eventually fully incorporated the Black Lives Matter message and movement and it remains a key pillar of his campaign. But he seems to be having a harder time doing the same for ISIS.

Sanders says he wants to be able to “walk and chew bubble gum at the same time” – discuss the decline of the middle class in addition to ISIS. But some days it seems he only wants to chew bubble gum.

This article originally appeared on MSNBC.com.