Boeing reported a second-quarter loss of $2.9 billion Wednesday as the grounding of 737 MAX following two deadly crashes continues to weigh on the company.

The loss, the biggest ever in a single quarter for the aerospace giant, follows last week’s announcement that Boeing would set aside $4.9 billion after taxes to compensate airlines for cancelled flights and the delay in plane deliveries.

Revenues tumbled 35.1 percent to $15.8 billion, reflecting the hit from a halt to deliveries of the 737 MAX, a top-selling plane.

Boeing also pushed back the timeframe for first flights of the 777X, a new long-haul plane under development. It pointed to problems with the 777X engine, which is being built by General Electric.

The 737 MAX has been grounded since mid-March following the second of two crashes that together claimed 346 lives.

Boeing is developing a software fix to address a problem with a flight handling system that was linked to both crashes.

“Disciplined development and testing is underway and we will submit the final software package to the FAA once we have satisfied all of their certification requirements,” Boeing said.

Boeing has said it is targeting early in the fourth quarter to win approval from regulators.

The company, which has pulled its full-year profit forecast due to uncertainty about the MAX, boosted dividend payments in the second quarter. Compared with last year, Boeing spent $1.2 billion in dividends, up 20 percent from the year-ago period.

Shares fell 0.8 percent to $369.84 in pre-market trading.