Wall Street’s major indexes closed higher on Tuesday as voters headed to the polls for midterm congressional elections and investors hoped the result would provide some relief for stocks after prolonged uncertainty.

Companies such as CVS Health and Mylan NV were helped by strong earnings. Nonetheless, trading volume was relatively thin as many investors held back on making big bets in case of a surprise election outcome.

Wall Street expects that the Republican party will lose control of the House of Representatives, while retaining the Senate.

Some investors said they would expect a sharp selloff, at least in the near term, if the Democrats gain control of both the House and the Senate. In contrast, stocks may rally on hopes of more tax cuts if Republicans retain control of the House. Others hoped that the elimination of election uncertainty would create a boost either way.

All the S&P’s 11 major sectors showed gains, led by a 1.5 percent rise in the materials index, which was aided by earnings reports.

Shares of Mosaic rose 10.6 percent and building materials producer Martin Marietta Materials gained 8.4 percent after strong results.

The trade-sensitive industrial sector index was up 1.1 percent after Chinese Vice President Wang Qishan said Beijing was ready to hold discussions and work with the United States to resolve trade disputes.

Healthcare index received a lift from Mylan, which rose 16 percent after the generic drug manufacturer reported a larger-than-expected third-quarter profit as it sold more products in emerging markets.

Pharmacy chain CVS Health rose 5.7 percent after its results.

The health sector could be under the spotlight after the election as Trump’s efforts to lower prescription drug prices could get more attention should Democrats gain control in Congress.

Approximately 6.85 billion shares changed hands on the major domestic equity exchanges, as compared to the 8.7 billion share average over the past 20 trading days.