NEW YORK (AP) — General Mills Inc. on Wednesday reported a better-than-expected profit for its fiscal third quarter on lower costs, but revenue fell short of expectations because of weak demand.

The maker of Cheerios cereal and Yoplait yogurt said sales in its key U.S. segment were down 7 percent on a mix of lower volume and its Green Giant divestiture. It said yogurt sales fell 10 percent as record-low milk prices prompted heightened competition in the category. Cereal sales slipped 2 percent during the quarter, but were flat for the year.

General Mills CEO Ken Powell said he still expects to end the year with growth in the cereal category. He said the company’s decisions to remove artificial ingredients from many brands and to make Cheerios gluten-free are proving popular with customers.

Still, Powell noted weakness in certain lines, including Fiber One and the Cheerios Protein it launched less than two years ago in a nod to the popularity of products with protein. He said the Cheerios Protein is not dead yet, but noted that the company regularly phases out products that aren’t doing well.

“If they’re not performing, it’s very routine for us to discontinue them,” he said.

The Minneapolis-based company said profit rose 5.4 percent to $361.7 million, or 59 cents per share, for the period. Earnings, adjusted for restructuring costs and non-recurring costs, were 65 cents per share.

That was better than the 62 cents per share analysts expected, according to Zacks Investment Research.

Total revenue fell 8 percent dip to $4 billion in the period, missing Street forecasts for$4.05 billion.

The company’s work to slash costs helped offset the revenue decline.

Shares of General Mills edged up 28 cents to $61.07 in morning trading.

Its shares have risen slightly more than 5 percent since the beginning of the year, while the Standard & Poor’s 500 index has stayed nearly flat. The stock has climbed 13 percent in the last 12 months.

(© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.)