Raytheon Technologies [RTX] on Tuesday said it swung to a loss in the second quarter largely due to a slump in commercial aerospace triggered by the ongoing COVID-19 pandemic while the defense businesses performed well.

The commercial outlook remains weak and the company has achieved its cost savings synergies for the year.

Sales in the quarter were $14.1 billion, and included $6.7 billion from the former Raytheon Co., which was acquired by United Technologies Corp. at the start of the quarter to create Raytheon Technologies. The results exclude Raytheon Co. sales from 2019 but the company said legacy Raytheon sales were up in the low single digits percentwise.

Sales in the legacy UTC businesses, Collins Aerospace and Pratt & Whitney, were down more than 30 percent each on a drop in original equipment and aftermarket revenue, partially offset by increased demand for military products and engines. Defense sales at Collins were up 10 percent on systems for the F-35 fighter and development contracts and at Pratt were up 11 percent on higher aftermarket sales on aircraft platforms and higher volume on the F135 engine for the F-35.

The net loss in the quarter was $3.8 billion, $2.55 earnings per share (EPS), versus $1.9 billion ($2.20 EPS) in net income a year ago. Excluding adjustments related to COVID-19, acquisition accounting, restructuring and other costs, adjusted net income of $598 million (40 cents EPS) in the quarter topped consensus estimates by 27 cents per share.

Given uncertainty in the commercial aerospace markets around the pandemic, the company still isn’t offering financial guidance for the year. However, Greg Hayes, CEO of Raytheon Technologies, said on an earnings call with analysts that it will be at least until 2023 before commercial air traffic returns to 2019 levels.

Internal costs associated with COVID-19 such as the purchase of personal protective equipment, facility cleaning, employee temperature scanning and higher freight costs are expected to clip another 8 cents EPS from the bottom line in the second half of the year, bringing the total costs to 16 cents EPS for the year, more than expected, Anthony “Toby” O’Brien, chief financial officer of Raytheon Technologies, said on the call.

The company continues to expect growth in its defense business for the next several years due to a strong backlog and continued strong orders, O’Brien said.

Overall backlog at the end of the quarter was $158.7 billion, with $73.1 billion from defense, a record. The book-to-bill ratio at the legacy Raytheon Co. businesses was 1.2 times sales in the quarter. The company is on track this year to achieve more than 20 percent of its orders from classified work, he said, which he said “provide the development and the funding for future technologies that lead to new franchises.”

In the “near-term,” defense spending won’t increase due to deficits. However, with record defense backlog combined with the company’s position in classified work, cyber and space and bipartisan support for strong national defense, “we’re not forecasting any gloom and doom scenarios for defense in the next few years,” Hayes said.

The integration of UTC and Raytheon is on track, including with achieving $2 billion in cost saving synergies this year and $4 billion in cash conservation, the company said.

Free cash flow in the quarter was an outflow of $248 million and for the year is still expected to around $2 billion.