President Donald Trump is in a position to get more concessions or even walk away from trade negotiations with China President Xi Jinping as the Chinese economy weakens, CNBC’s Jim Cramer said Tuesday.

The U.S. could put more pressure on the Chinese to meet demands to stop stealing intellectual property and allow American companies to operate in China without making joint ventures, among other priorities, he said. Or Trump could walk away and find a better bargaining position, but it could come at a cost he might not want to take on, he added.

“President Trump believes he’s given big business enough of a boost with his tax cuts. He can afford to alienate business with a little tough love on China,” Cramer said. “The wild card: The president may not want the stock market to go down because he views the averages as his Nielsen ratings, and he cares tremendously about his Nielsens.”

Cramer said some fund managers have begun to short stocks with China exposure and bet long on names unaffected by the ongoing trade talks between the world’s largest economies. He pointed out that companies like Micron and 3M are starting to lose traction as negotiations drag on, but others like Facebook and Google-Parent Alphabet that have nothing to do with China are gaining momentum.

The major averages all slipped during the Tuesday session as well, which is a sign that if a trade deal doesn’t happen soon that the problem could get worse, he said.

But as China’s economy continues to slow, Cramer said Xi will continue getting hit with bad press such as recent headlines in the Washington Post—”China’s Communist Party is battening down the hatches as the economy slows”—and Wall Street Journal—”Xi Jinping Works to Stifle Dissent Amid Concerns About China’s Economy.” It appears the leader could be losing the advantage he held in the trade war, the host said.

Cramer said he doesn’t think bets that have been placed on trade talks failing are being made with “great convictions,” but the odds are still in the air.

“If the President reads or hears enough about these Xi-in-trouble stories, you have to believe there is a decent chance that he’ll walk away to see if he can get a better bargaining position,” he said. “That may prove to be good for the country, but in the near-term, it would be pretty darn rough for the stock market.”