Optimism about the nation’s economic outlook among U.S. business leaders rose in the third quarter, according to a new report from Grant Thornton.

The Grant Thornton International Business Report found business optimism in the U.S. increased 20 percentage points in the third quarter to a net balance of 74 percent, only the second time since 2004 it has surpassed net 70 percent.

Grant Thornton surveyed more than 2,500 business leaders in 36 economies, and found the United States is the fifth most optimistic economy overall.

In the third quarter, business optimism dropped from net 58 percent to net 38 percent across the European Union, and from net 54 percent to net 33 percent in the Eurozone.

Confidence in China, the world’s second-largest economy, decreased to net 26 percent, down 20 percentage points from the previous quarter. Globally, net 38 percent of businesses are optimistic, down from net 45 percent last quarter, with the most confident businesses in Ireland (net 90 percent), India (net 87 percent), the Philippines (net 86 percent) and Nigeria (net 76 percent).

“While China dominated the global business headlines, American business leaders may not have been fazed by the news, according to our study,” said Grant Thornton CEO Mike McGuire in a statement. “Despite currency devaluation in China, confidence among U.S. business leaders continued to rise, and the spending in R&D and the growth in exports are evidence of that. However, there’s some less-encouraging news in the fact that long-term investment decisions are still on hold. A majority of those surveyed are still hesitant—optimistic, but hesitant.”

While confidence declined globally, U.S. business leaders didn’t share that sentiment. Increased plans to invest in research and development and all-time high export expectations drove U.S. business confidence. The percentage of U.S. companies planning to invest in R&D increased to net 36 percent, a 4 percentage-point increase from last quarter and a 9 percentage-point increase from one year ago. In addition, U.S. export expectations increased to net 26 percent, marking the highest level in survey history and a 1 percentage-point increase from the previous quarter.

While optimism among U.S. business leaders has risen, sentiment about other areas of U.S. business performance and stability remains relatively unchanged, according to the report. U.S. companies’ plans to invest in new buildings in the next 12 months remained stagnant at net 26 percent in third quarter 2015, while plans to invest in plants and machinery increased just 2 percentage points to net 22 percent. Revenue expectations among U.S. business leaders remained net 70 percent in third quarter, while profitability expectations decreased 9 percentage points to net 56 percent.

Grant Thornton also found U.S. hiring expectations remained relatively high at net 45 percent, down only 3 percentage points from last quarter, while U.S. pay raise expectations improved 7 percentage points to net 17 percent of U.S. business leaders expecting to offer employees an above-inflation pay raise in the next 12 months. A net balance of 29 percent of U.S. business leaders cite economic uncertainty as a constraint on their ability to grow their operations in the next 12 months, up 7 percentage points from the previous quarter, but a 6 percentage-point decrease from a year ago.