(Bloomberg) -- President Joe Biden said there are signs inflation is beginning to moderate after it slowed more than expected in July, giving him a much-needed boost ahead of the November midterm elections.

“We’re seeing a stronger labor market where jobs are booming and Americans are working and we’re seeing some signs that inflation may be beginning to moderate,” Biden said Wednesday before signing a veterans health-care bill, calling the numbers evidence his “economic plan is working.”

Yet he cautioned that the nation could still face economic headwinds in the coming months due to the war in Ukraine and supply chain disruption stemming from pandemic shutdowns in Asia.

“It’s far from done, our effort to bring inflation down, but we’re moving in the right direction,” said Biden.

High consumer prices have wreaked havoc on Americans’ budgets, causing political damage to Biden and Democrats that could cost them control of Congress in the fall. The president’s approval rating fell to a new low of 38% at the end of July, according to a Gallup poll. 

Related: US Inflation Runs Cooler Than Forecast, Easing Pressure on Fed

Since then, Biden has won several victories on key parts of his agenda, including the Senate’s passage of a hard-fought tax, health and climate bill. He also signed a new gun safety law, subsidies for US semiconductor manufacturing and protocols for Finland’s and Sweden’s entry to NATO. Democrats hope slowing inflation will add to their momentum and help them limit their losses in November. 

The consumer price index increased 8.5% from a year earlier, a still-high figure but down from the 9.1% spike in June that was the largest in four decades, Labor Department data showed Wednesday. Prices did not change compared to last month. A decline in gasoline and airfare offset increases in other areas like food and housing. 

The numbers beat the expectations of economists who projected in a Bloomberg survey a 0.2% rise in headline CPI from a month ago and an 8.7% compared to last year.

Republicans have blamed Biden’s policies for driving inflation, including last year’s $1.9 trillion coronavirus relief package, and warned that the Senate bill could further contribute to the problem.

©2022 Bloomberg L.P.