The major domestic equity indexes ended a choppy session on Monday with a slight gain as weakness in defensive stocks offset optimism following Trump’s conciliatory remarks toward China’s ZTE Corp that calmed the waters of U.S.-China trade tensions.

The S&P 500 index pared its gains after hitting a roughly two-month high earlier in the session, but at closing bell the index held onto its four-day winning streak.

Trump vowed on Sunday to help China-based communications firm ZTE (000063.SZ) “get back into business, fast” nearly a month after the Commerce Department implemented a ban on companies selling to ZTE.

Trump’s reversal arrived on the cusp of high-level talks between the world’s two largest economies, due to resume this week after back-and-forth rhetoric between the countries stoked fears that retaliatory tariffs could be imposed.

With 91 percent of S&P 500 companies having reported first-quarter results, earnings were on pace for a 26.1 percent increase, according to Thomson Reuters data.

Of the 11 major sectors in the S&P 500, defensive utilities, telecoms and real estate stocks were the largest percentage losers.

Healthcare stocks saw the largest gains after the Trump administration unveiled its drug price proposals.

Meanwhile, energy companies advanced as oil prices rose following an OPEC report that the global oil glut had been all but eliminated.

Smaller-sized companies are outperforming the heavyweights; while the Russell 2000 slipped 0.2 percent, earlier in the session it came within less than two points of its previous record high.

Gaming company stocks rose as the Supreme Court paved the way for states to legalize sports betting. Casino and race track operator Penn National posted a record high, up 4.7 percent. Caesars Entertainment and Madison Square Garden gained 5.5 percent and 2.6 percent, respectively.

Optical component maker stocks received a boost from the ZTE news, with Acacia Communications up 8.7 percent. Oclaro and Lumentum advanced 2.9 percent and 2.2 percent, respectively.

Shares of defense contractors such as Raytheon, Lockheed Martin and Northrop Grumman weighed on the markets as investors pointed to easing geopolitical tensions.

Xerox fell 4.3 percent after abandoning a planned $6.1 billion deal with Fujifilm Holdings.

Shares of Viacom closed down 4.9 percent after CBS sued to stop controlling shareholder Shari Redstone’s planned merger with Viacom. CBS was up 2.0 percent.

Approximately 5.96 billion shares changed hand on the major domestic equity exchanges, as compared to the 6.65 billion share average for the full session over the past 20 trading days