Boeing [BA] on Wednesday reported another charge in its program to develop and produce the Air Force’s new aerial refueling aircraft, although the blemish paled compared to an even heftier reserve the company took related to fixing problems with its 787 widebody commercial passenger jet.

The $402 million pre-tax charge on the KC-46A tanker aircraft brings the cumulative value of charges over the life of the program to $5 billion. Boeing prevailed over a team of Europe’s Airbus and Northrop Grumman [NOC] to win the tanker contract in 2011.

“The charge was primarily driven by evolving customer requirements for the Remote Vision System (RVS), as well as factory and supply chain disruptions including the impact of COVID-19,” Dave Calhoun, Boeing’s president and CEO, said during the company’s fourth quarter earnings call. “While we continue to work closely with the Air Force on RVS 2.0, the KC-46 is currently successfully flying refueling missions with operators having delivered more than 60 million pounds of fuel to a wide array of aircraft.”

So far, Boeing has delivered 56 KC-46A aircraft, which has been approved by the Air Force to “operationally refuel almost 70 percent of receiver aircraft, and it is being called upon to support many high priority missions,” he said.

Net losses in the quarter narrowed to $4.2 billion, $7.02 earnings per share (EPS), from $8 billion ($14.65 EPS) a year ago. Excluding certain pension impacts, core earnings were $7.69 EPS, far worse than the 28 cents per share loss expected by analysts.

The biggest driver for the continued losses was the 787 program, which suffered a $3.5 billion pre-tax non-cash charge due to lessons learned on fixes to the aircraft, delays in restarting deliveries and customer concessions.

The 787 fleet that is already in service is the most widely “utilized” widebody plane and has a 98.99 percent reliability rate, Calhoun said.

Sales in the quarter fell 3 percent to $14.8 billion from $15.3 billion a year ago due to a decline in the defense segment, which more than offset a strong increase in the services business and a slight gain in commercial planes. Defense sales fell on lower volume across the portfolio.

For the year, sales increased 7 percent to $62.3 billion from $58.2 billion, driven mainly by an increase at the Commercial Airplanes segment on higher deliveries of 737 MAX passenger planes, followed by gains at the services and defense segments.

Net losses for the year narrowed to $4.3 billion ($7.15 EPS) from $11.9 billion ($20.88 EPS). Core earnings were a loss of $9.44 EPS.

Free cash for the year was an outflow of $4.4 billion but in the quarter was positive by $494 million. Boeing expects to be free cash flow positive in 2022, with Brian West, the company’s chief financial officer, saying it will be in “the small billions” of dollars.

In 2021, Boeing’s free cash flow was a $19.7 billion outflow. Boeing stopped paying dividends nearly two years ago and hasn’t been repurchasing its stock for even longer to preserve cash as it developed and implemented fixes to the 737 MAX aircraft following two catastrophic accidents with the plane in 2018 and 2019.

Boeing hasn’t been providing detailed financial guidance while it sorts through some of its commercial performance issues but in addition to giving an expectation for positive free cash flow in 2022, the company is projecting top-line growth on the back of higher commercial aircraft deliveries, gains in the services segment, and stable defense sales.

Total backlog at the end of 2021 stood at $377.5 billion, up 4 percent from $363.4 billion a year ago. The gain was driven solely by increased orders for commercial aircraft. Defense backlog slipped 2 percent to $59.8 billion from $60.8 billion.