Whole FoodsMarket (WFM) shares fell as much as 4% but rebounded slightly in after-hours trading Wednesday after the struggling grocer reported disappointing first quarter earnings and lowered its 2017 guidance.

Revenues increased 1.9% year-over-year to $4.92 billion, while same-store sales fell 2.4%. Analysts expected Whole Foods to report revenues of about $4.98 billion, according to FactSet. Earnings per share of 30 cents fell short of the expected 39 cents.

Whole Foods also absorbed a non-cash charge of $34 million, or 6 cents a share, related to store closures, and an additional charge of $13 million, or 3 cents a share, as part of former co-CEO Walter Robb's departure in November. Excluding these charges, Whole Foods' earnings would have been 39 cents a share, in line with consensus estimates. The store closures will cause an additional $30 million, or 6 cents a share, in the second quarter.

Shares traded down about 50 cents to $28.75 in after-hours trading after ending Wednesday up 32 cents, or 1%.

Operating income fell over 30% year-over-year, driven mainly by store closures, relocation and lease termination costs. So far in the second quarter, Whole Foods has opened three stores (including one relocation) and expects to open three more stores, including another relocation. However, the company plans to close nine more stores during the quarter.

Although it was a pioneer of the organic food trends, Whole Foods has struggled in recent quarters amid a variety of strong competitors. 365 by Whole Foods was a highly touted new offering when it was first unveiled in 2015, but the earnings report only mentions the value-focused chain once.

William Blair analyst Ryan Domyancic noted last month that natural and organic foods are more widely available at conventional grocery stores, with Kroger (KR) - Get Report , Costco (COST) - Get Report and Walmart (WMT) - Get Report competing with Whole Foods on price. Amazon (AMZN) - Get Report has also made inroads into fresh groceries, as have well-funded startups like Blue Apron.

In November, Whole Foods revealed its first-ever declining same-store sales and ousted Robb, leaving co-founder John Mackey as sole CEO. Longtime CFO Glenda Flanagan will also retire at the end of the 2017 fiscal year.

For the full year, Whole Foods expects sales growth of at least 1.5% and same-store sales declining at most 2.5%, with diluted earnings per share of $1.33. That's down from the guidance issued after its fiscal 2016 annual report, which forecast sales growth of 2.5% to 4.5% and same-store sales flat to falling 2%, with earnings of at least $1.42 a share. The new guidance cut Ebitda margin slightly, from 8.2% to 8%, with capital expenditures and return on invested capital holding steady at 4% of sales and 11%, respectively.

Net of closures, Whole Foods expects to grow its square footage by 5%, down from the 6% forecast at the end of fiscal 2016. The square footage count reflects plans to open 30 new stores, including six relocated closed stores and three locations for its new 365 budget-friendly concept. There's currently 93 stores in development, the filing stated.

A relatively late Easter, occurring in Whole Foods' third quarter 2017, will negatively impact same-store sales for the second quarter, the quarter when Easter fell in 2016. Whole Foods noted that sales and profits tend to be highest in the second and third quarters.

The Austin-based grocer has $1.1 billion in total debt and $1.2 billion in available capital.