PepsiCo reported stronger than expected revenue in the second quarter despite weaker demand in North America, where it said consumers tightened their budgets due to economic concerns.

The food and beverage giant said Thursday that its net revenue rose 6.4% to $24.2 billion for the April-June period. That was better than the $23.9 billion Wall Street expected, according to analysts polled by FactSet.

In February, ahead of the Super Bowl, PepsiCo slashed U.S. prices on Lay’s, Doritos, Cheetos and Tostitos chips by up to 15%, responding to consumers’ increasing exasperation after years of price hikes. That boosted snack demand in North America in the first quarter.

But in the second quarter, as gas prices spiked due to the Iran war, PepsiCo’s snack sales volumes were flat in North America, while its beverage volumes fell 4%.

Americans’ attitudes toward the economy have improved slightly as gas prices declined, but their outlook remains mostly negative. And hostilities in Iran have begun to escalate again, driving gasoline prices higher over the past two days.