U.S. manufacturing output increased more than expected in August, boosted by a surge in machinery and primary metals production, but the outlook for factories remains weak against the backdrop of trade tensions and slowing global economies.

The Federal Reserve said on Tuesday manufacturing production rose 0.6% last month after an unrevised 0.4% drop in July.

Economists polled by Reuters had forecast manufacturing output rising 0.2% in August. Production at factories fell 0.4% in August on a year-on-year basis.

Manufacturing, which accounts for about 11% of the U.S. economy, is being hobbled by a year-old trade war between the United States and China and slowing global economic growth. The trade war has eroded business confidence, leading to a slump in the sector, which ironically the Trump administration has sought to protect against what it called unfair foreign competition.

A survey early this month showed a measure of national manufacturing activity contracted in August for the first time since August 2016. Manufacturing has also been hurt by an inventory overhang, especially in the automotive industry.

Fears that the effects of the trade impasse could spill over to the broader economy are expected to compel the Fed to cut interest rates again on Wednesday to keep the longest expansion in history, now in its 11th year, on track.