Oil rose as a weaker dollar offset a government report that showed a smaller-than-expected decline in crude stockpiles in the wake of a viral resurgence.

Futures advanced 1.4% after falling as much as 2.4% earlier when the U.S. called on the OPEC+ alliance to revive production more quickly. The dollar weakened, boosting the appeal of commodities priced in the currency, with data showing consumer prices increased at a more moderate pace in July, reducing concern about an unwinding of some of the stimulus.

“The dollar index is helping out all the commodities and it slipped to the negative side of the equation after the data release today, helping to support the crude market as well,” says Bob Yawger, director of the futures division at Mizuho Securities USA.

Oil whipsaws amid stock dip and virus fears

Prices were under pressure earlier in the session after the U.S. called on the OPEC+ alliance to revive production more quickly. The world’s largest oil-consuming nation has seen gasoline prices firmly above $3 a gallon in recent months, putting pressure on drivers who are back on the road as pandemic restrictions ease.

The Energy Information Administration report also showed gasoline stockpiles fell with strong draws in New York Harbor as well as on the West Coast, though overall demand for the fuel slumped. The lackluster shale supply growth is set to tighten markets as the third financial quarter unfolds.