Walmart posted solid sales and profits in the latest quarter, helped by online spending and a massive $2.9 billion tariff refund, the largest yet reported.

But store sales disappointed investors as consumers pulled back in the face of higher gas prices.

The nation’s largest retailer earned $6.4 billion in net income in the three months ending July 31, better than the company’s earlier guidance. It also raised its forecast for the year.

Still, Walmart shares (WMT) fell more than 8% in early trading Thursday after sales growth at US stores, excluding fuel, rose only 2.6% in the quarter compared to 4.6% a year ago. That’s partly due to lower drug pricing for GLP-1 weight loss drugs, as well as more customers choosing to shop online. Walmart is often viewed as a bellwether for the strength of consumer spending.

Walmart said that higher gas prices are cutting into American’s ability to spend on other things. CFO John David Rainey said there is “arguably a softer consumer environment than in February” before gas prices spiked.