If Blue Apron investors were hoping the worst had passed in the wake of its bumpy IPO, they weren’t prepared for its inaugural earnings report.

Shares of Blue Apron closed down 17.6 percent at $5.14 a share Thursday after the company reported a net loss of 47 cents a share in the second quarter, larger than the 30 cent loss analysts had expected. The company also warned of slower revenue growth and higher operating costs for the rest of the year as it works through some growing pains.

The decline left Blue Apron worth $974 million, below the $1 billion valuation mark delineating unicorns from smaller startups. In six weeks, Blue Apron has lost nearly half of the $1.89 billion valuation it held when its IPO priced in late June. That valuation was marked down from the company’s original plans, which would have valued it between $2.8 billion and $3.2 billion.

Since filing to go public, Blue Apron has been dogged by a string of bad news, including Amazon’s move to buy Whole Foods Market and signs that Amazon could move into Blue Apron’s market of meal-kit deliveries. Today’s earnings report revealed two other problems the company is struggling with.

The first is Blue Apron’s transition from an older fulfillment center in Jersey City, New Jersey, to a new center in Linden, New Jersey. In February, the company said the center would have “state-of-the-art technology” and “improve the efficiency and capacity of our operations.” Last week, it notified 1,270 workers in Jersey City, about a quarter of its workforce, that their jobs would move.

On a call discussing its earnings, Blue Apron executives said its plans for product expansion were stymied by the move to the Linden center, which represented only 3 percent of its national volume despite beginning deliveries on May 15. CFO Brad Dickerson said “unexpected complexities and costs” from the center could push the net loss in the second half of 2017 as high as $128 million.

The second problem was a slowdown in revenue, due in part to the delay in Blue Apron’s product expansion but mostly to a cutback in marketing expenses, which fell to $35 million last quarter from $61 million in the first quarter. The lower marketing spend caused the number of customers to decline to 943 million last quarter, down 9 percent from the first quarter.

Dickerson said Blue Apron would reduce its marketing spend through the rest of 2017, which would weigh on revenue. He expects revenue to be between $380 million and $400 million for the rest of 2017, which would be 7 percent below the revenue in the last six months of 2016.

Blue Apron executives underscored their belief that the problems facing the company are short term, highlighting the company’s longer-term potential. But their ability to execute on a business plan to grow operations is rattling investor confidence, especially with Amazon looming as a threat.