(Bloomberg) -- Boeing Co. generated $81 million in cash from its operations during the second quarter, sharply reversing its heavy cash use earlier this year as the planemaker stepped up deliveries of its highly profitable 737 Max jetliners.

The performance outpaced Wall Street’s expectations, with analysts predicting the manufacturing titan would burn through $343 million, according to data compiled by Bloomberg. It puts Boeing on track to generate free cash flow on an annual basis for the first time since 2018, Boeing’s Chief Executive Officer Dave Calhoun told employees in a memo Wednesday.

“Even as we navigate a difficult environment, we are making progress across key programs and are beginning to hit significant milestones,” Calhoun said.

Boeing still has much work to do before its financial and operational turnaround is complete. Cost overruns on contracts for its Starliner space capsule and MQ-25 aerial refueling drone led to $240 million in accounting charges, the Arlington, Virginia-based company said in a statement. 

Boeing’s second-quarter revenue of $16.7 billion and 37-cent core loss per share were both worse than analysts expected. The company’s earnings have missed consensus estimates in all but one quarter since the start of 2021.

Investors are eager for signs the US manufacturer is starting to emerge from the years of losses and operations breakdowns that have eroded its cash stockpile and left it burdened with debt. Boeing faces growing pressure to repair its balance sheet, and questions as to whether it will need to sell equity to pay down debt and eventually fund a new airplane.

The shares rose 4% before the start of regular trading in New York. Boeing tumbled 23% this year through Tuesday’s close.

©2022 Bloomberg L.P.