Wall Street had expected the company to continue losing money.