The major domestic equity indexes chalked up small gains on Wednesday, fueled by energy and financial shares and helped by news of an agreement to extend the debt limit, as stocks bounced back modestly from a day-earlier selloff.

The equity markets added to moderate gains as President Trump, siding with Democrats over his fellow Republicans, said he agreed to pass an extension of the U.S. debt limit until Dec. 15, potentially avoiding an unprecedented default on U.S. government debt.

Data indicated that the. services sector accelerated during August amid strong gains in new orders and employment, while another report showed only a modest rise in the trade deficit during July – the latest signs that the economy had gathered momentum early in the third quarter.

A Federal Reserve survey indicated the economy expanded at a modest to moderate pace from July through mid-August.

The S&P 500 on Tuesday had suffered its biggest single-day decline in nearly three weeks amid fresh tensions involving North Korea and a second powerful hurricane bearing down on the U.S. south.

The energy sector rose 1.7 percent, on track for its largest single-day gain in two months, as oil prices rose. Strong global refining margins and the reopening of the Gulf Coast refineries provided a more bullish outlook after sharp drops due to Hurricane Harvey.

Gains for oil majors Exxon Mobil and Chevron supported the S&P 500 and the Dow.

Financials climbed 0.6 percent a day after their largest one-day drop since mid-May.

Investors were digesting news that Fed Vice Chair Stanley Fischer said he would step down from his position in mid-October, potentially accelerating Trump’s opportunity to reshape the direction of the central bank.

AT&T and Verizon were each off more than 1 percent, dragging on the S&P. Rival T-Mobile said it will offer a free subscription to video streaming service Netflix with its unlimited data family plans.

Newell Brands fell 3.4 percent after the Sharpie maker slashed its profit outlook for 2017, while apparel retailer Francesca’s Holdings fell 3.5 percent after its profit forecast fell below estimates.

Service Sector Expands

The services sector accelerated during August amid strong gains in new orders and employment, suggesting that a slowdown in job growth last month was probably temporary.

The economic outlook received a further boost from other data on Wednesday showing only a modest rise in the trade deficit in July. The reports were the latest signs that the economy had gathered momentum early in the third quarter. However, hurricane Harvey, which devastated parts of Texas, could sap some of the strength.

The Institute for Supply Management (ISM) said its non-manufacturing activity index increased 1.4 points to 55.3 in August, rebounding from an 11-month low in the prior month. A reading above 50 indicates expansion in the sector, which accounts for more than two-thirds of economic activity.

Last month’s increase in services industry activity also reflected a jump of 1.6 points in the production sub-index.

Even more encouraging, a measure of services sector employment jumped 2.6 points. The government reported last week that the economy created 156,000 jobs in August, with the private services sector hiring the smallest number of workers in five months.

The slowdown in job growth is most likely a seasonal quirk. Over the past several years, the initial August job count has tended to exhibit a weak bias, with revisions subsequently showing strength.

Last month, services industries also reported an increase in new orders as well as prices. The ISM said the “majority of respondents are optimistic about business conditions going forward.”