Boeing [BA] on Wednesday reported a loss in its second quarter, but not quite as bad as a year ago, as sales fell sharply on fewer commercial aircraft deliveries due to continued weakness in the 737 MAX passenger jet program, temporary shutdowns of some facilities in the spring, and the ongoing impacts to airlines from the novel coronavirus.

The net loss of $2.4 billion, $4.20 earnings per share (EPS), was less than the $2.9 billion ($5.21 EPS) loss a year ago. The adjusted net loss of $3.3 billion ($4.79 EPS), which excludes various pension adjustments, was worse than the $2.57 EPS loss expected by analysts.

Sales tumbled 25 percent to $11.8 billion from $15.8 billion a year ago driven by a steep decline at the Commercial Airplanes segment and a sharp decline at the Global Services segment due to a drop in commercial business.

Boeing’s Defense, Space & Security segment reported flat sales of $6.6 billion and a 38 percent drop in operating income to $600 million.

The decline in operating earnings was due in part to a $151 million charge on the Air Force’s KC-46A tanker program, which was driven by lower commercial aircraft production stemming from COVID-19. The KC-46 is a derivative of the commercial 767 aircraft and is produced at one of the company’s commercial aircraft facilities in Washington. A year ago, the segment benefited from the sale of property.

The tanker program is performing well, Greg Smith, Boeing’s chief financial officer, said on a media call following an earnings call with analysts.

The program has suffered a number of charges the past few years due to performance issues, most recently with a system to help operators with aerial refueling operations.

Backlog at the defense segment was $64.3 billion at the end of the quarter, up a percent from $63.7 billion at the end of 2019. International business makes up 31 percent of the current backlog.

Sales at Commercial Airplanes were down 65 percent to $1.6 billion on a drop in aircraft deliveries to 20 versus 90 a year ago. The operating loss narrowed to $2.8 billion due to a significantly lower customer considerations charge on the 737 MAX program but the program also suffered from a charge for abnormal production costs and the segment was further hit by severance expenses and temporary production shutdowns related to COVID-19.

The outlook remains grim.

“The reality is the pandemic’s impact on the aviation sector continues to be severe,” Dave Calhoun, Boeing president and CEO, said in a letter to employees. “Though some fliers are returning slowly to the air, their numbers remain far lower than 2019, with airline revenues likewise reduced. This pressure on our commercial customers means they are delaying jet purchases, slowing deliveries, deferring elective maintenance, retiring older aircraft and reducing spend—all of which affects our business and, ultimately our bottom line. While there have been some encouraging signs, we estimate it will take around three years to return to 2019 passenger levels.”

Revenue from government services partially offset a decline in commercial sales at Global Services and the segment swung to a loss on the decline in sales, a shift toward lower margin products and services, and $923 million in charges and severance costs related to the COVID-19 market environment.

In his letter to employees, Calhoun said the company’s diverse portfolio is helping to cushion the blow.

“The diversity of our portfolio and our government services, defense and space programs provide some stability in the near term as we take these tough but necessary steps.”

Those tough steps include further cuts to production in some of commercial airplane programs, potential adjustments to facility footprints, and further potential workforce reductions on top of a net 10 percent cut in 2020, he said.

On the earnings call, Calhoun said the job reductions this year will amount to 15 percent of the commercial workforce. The defense business continues to hire, he said.

The ongoing job cuts are through a combination of voluntary layoffs, attrition and involuntary layoffs.

Total backlog at the end of the quarter stood at $408.7 billion, down 12 percent from $463.4 billion at the end of 2019, driven primarily by a decline at Commercial Airplanes followed by Global Services. The drop in backlog at Commercial Airplanes is due to order cancellations and removal of orders.

Boeing has a commercial aircraft backlog of more than 4,500 planes valued at $326 billion, Smith said on the call.

Free cash flow was a $5.6 billion outflow during the quarter.