(CNN) — Boeing reported a $3.7 billion adjusted loss in the second quarter because of the grounding of the 737 Max, its bestselling jet.

The company had already warned investors that it would take a $5 billion profit hit from its inability to deliver the 737 Max to its customers.

READ MORE: Ex-NorthShore Gynecologist Fabio Ortega Pleads Guilty To Sexually Abusing Patients

Boeing has continued to build the plane, although at a slower pace, and that has increased the cost of production by about $1.7 billion. The plane has been grounded since mid-March because of two fatal crashes that killed more than 300 people.

Boeing’s results did not include a cost of litigation related to the two crashes. The company announced it will set up a fund to distribute $100 million to the families of victims. But it also said it took a $201 million hit to profit last quarter primarily for a litigation reserve.

The Chicago-based company was helped by better results from its defense and services business. Earnings from defense, space and security business more than doubled, increasing $600 million. Its commercial aircraft unit reported a $4.9 billion loss as revenue plunged by $9.2 billion.

Boeing gets most of the revenue from the sale of planes at the time of delivery, which have been halted during the grounding. New orders for other aircraft have also fallen sharply during the crisis.

READ MORE: Dixmoor Sends Plea For Help As Water Pressure Down To A Trickle In Parts Of South Suburb

The $3.7 billion loss, excluding one-time items, compares to a $2.4 billion profit Boeing earned on that basis a year earlier.

Boeing also burned through about $1 billion in cash in the quarter. But Boeing said it had nearly $10 billion in cash and securities on hand to help it weather continued losses. It was able to issue new debt during the quarter to help it increase its cash reserves.

It is not clear when the 737 Max will be allowed to return to service. Boeing is working on a software fix to a safety system which is believed to have caused the two crashes. But it says it won’t be able to present that fix to aviation authorities until early September at the earliest. That probably means the plane won’t be cleared to fly again until at least late this year. Boeing said the uncertainty about the return to service means it still can’t give guidance on future results.

The loss and that lack of guidance sent shares of Boeing down about 1% in premarket trading. But the warning on results last week and the fact that the loss was actually a bit less than some Wall Street estimates kept the drop in shares from being worse. Shares of Boeing are actually up about 15% since the start of the year, although they are down since the second fatal crash in March.

MORE NEWS: Former Chicago Mayor Rahm Emanuel Testifies To Become The Next Ambassador of Japan

The-CNN-Wire™ & © 2019 Cable News Network, Inc., a Time Warner Company. All rights reserved.