(Reuters) - Boeing Co BA.N on Wednesday swung to its first annual loss since 1997 as 737 MAX costs doubled to nearly $19 billion, and the plane manufacturer indicated it would again cut production of its bigger 787 Dreamliner aircraft, currently its main source of cash.

Boeing, struggling to restore public confidence and recover from the biggest crisis in company history, has halted production of the once fast-selling 737 MAX which was grounded in March following two deadly crashes. The company is immersed in compensation talks with airline customers and dealing with lawsuits from victims’ families and a criminal probe.

Boeing shares were 1.2% higher, as some analysts had expected an even larger charge for 737 MAX costs. The stock has lost about a quarter of its value since early March 2019.

Deliveries of hundreds of jets remain frozen while Boeing updates the flight control system and software to address issues involved in both crashes.

President and CEO David Calhoun said he believes Boeing can win regulatory approval for the planes to fly again by mid-year. Boeing had initially targeted 737 MAX approval in 2019. That overly optimistic timeline, coupled with criticism that company culture valued profits over safety, contributed to former CEO Dennis Muilenburg’s departure.

Calhoun, who served on Boeing’s board for 10 years, dismissed suggestions that he was an “insider” ill-suited to introducing radical change and pledged to overhaul the culture.

“I think I watched the same movie you did,” he told reporters.

Costs related to the 737 MAX grounding reached $14.6 billion in 2019 and the planemaker warned of another $4 billion in charges in 2020 due to the expense of slowly re-starting production. Boeing had estimated a $9.2 billion price tag for the MAX fallout in the third quarter.

The amount does not include potential settlements or damages from more than 100 lawsuits the company faces from victims’ families in both crashes, which together killed 346 people. Boeing is also the target of a U.S. criminal investigation into matters related to the 737 MAX.

Slideshow ( 3 images )

It also remains to be seen whether passengers will be willing to fly in the 737 MAX once regulators approve Boeing’s fixes.

“I can’t market it or merchandise it or hang banners on it or change the name of it. That won’t convince anybody. But when they see it operating and they see it flown and they see pilots getting on, I think we’re gonna be okay,” Calhoun said.

Boeing’s core operating loss was $2.53 billion, or $2.33 per share, compared with a profit of $3.87 billion, or $5.48 per share, a year earlier.

Analysts on average expected Boeing to post earnings per share of $1.47 in the quarter, though several had predicted a loss amid a wide range of forecasts due to uncertainties over the cost of the 737 MAX crisis.

The company also booked more charges on its military tanker and space programs.

JETS AND CASH

Adding to Boeing’s pain, demand for its bigger and more profitable jet - the 787 Dreamliner - has waned in the face of the U.S.-China trade war.

Boeing had already announced in October plans to lower the production rate for its 787 Dreamliner to 12 per month in late 2020 from 14 and now expects to cut the rate to 10 per month in early 2021, hurting cash flow at a time when its debt is mounting.

Slideshow ( 3 images )

Boeing reported negative free cash flow of $2.67 billion for the fourth quarter ended Dec. 31, compared with a positive free cash flow of $2.45 billion a year earlier.

Cash flow recovery is not expected to start until 2021, Chief Financial Officer Greg Smith said on the call.

The MAX charges include $8.3 billion to compensate airline customers that are canceling flights and scaling back growth plans in a hit to profits while their MAX jets remain grounded.

U.S. airlines have taken the MAX off their schedules until early June and have said they need at least 30 days after regulatory approval to prepare their jets and train pilots. Boeing is recommending both simulator and computer-based training.

Calhoun said it would take about 18 months to work through its 737 MAX inventory once deliveries resume.

General Electric Co GE.N plans to slash 737 MAX engine deliveries to Boeing roughly in half this year.

In a respite from the crisis over the MAX, Boeing successfully staged the first flight of a larger jet, the 777X, on Saturday.

But Calhoun has sent the aerospace giant back to the drawing board on proposals for a new mid-market aircraft, effectively shelving in their current form plans worth $15 billion-$20 billion.

He told analysts the decision was not about him “not wanting to do new airplanes. We’ll do one.”

“But honestly right now it’s all about the MAX.”