MINNEAPOLIS (AP) — General Mills’ fiscal fourth-quarter results beat analysts’ expectations as the packaged food company worked on slashing costs and refreshing its product lineup amid struggling sales.

The Minneapolis-based company boosted its quarterly dividend by 4 percent, and shares rose about 2 percent in morning trading Wednesday.

For the period ended May 29, the maker of Cheerios cereal, Yoplait yogurt and Progresso soups said net sales fell 9 percent to $3.93 billion, from $4.3 billion a year ago.

The decline reflected a drop in volume, and to a lesser degree, unfavorable foreign exchange rates. The company noted that its Yoplait business in the U.S. was hurt by the increased competition spurred on by lower dairy commodity costs.

Like other major packaged food makers, General Mills has been cutting costs as it fights to better reflect shifting tastes and keep up with competition from smaller players. General Mills executives say they’re working on pushing up sales for categories like cereal and yogurt by adjusting to changing preferences. For instance, the company has been touting its Cheerios as gluten-free to boost sales, and working on removing artificial ingredients from its cereals.

For the quarter, the company earned $379.6 million, or 62 cents per share. A year earlier it earned $186.8 million, or 30 cents per share.

Earnings, adjusted for restructuring costs, came to 66 cents per share, topping the 60 cents per share that analysts surveyed by Zacks Investment Research expected.

For the year, General Mills Inc. posted an adjusted profit of $2.92 per share on revenue of $16.56 billion. Going forward, the company anticipates fiscal 2017 adjusted earnings per share to grow 6 percent to 8 percent, on a constant-currency basis, from fiscal 2016’s $2.92 per share.

For fiscal 2018, General Mills expects a low double-digit increase in adjusted earnings per share on a constant currency basis.

The company said that its board cited strong earnings growth and cash generation performance in declaring a quarterly dividend of 48 cents per share. The dividend is payable on Aug. 1 to shareholders of record on July 11. Its prior quarterly dividend was 46 cents per share.

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