THE HAGUE, Netherlands (AP) — Dutch flag carrier KLM announced Thursday it is repaying the last portion of loans it got from from the Netherlands government and banks to help it survive when the COVID-19 pandemic threw global aviation into a tailspin.

The carrier is paying back 277 million euros ($290 million) to the government, the last outstanding loan out of a total of 942 million euros. KLM earlier this year paid back the rest of the loans to banks.

The announcement came a before day CEO Pieter Elbers is to be replaced by Marjan Rintel and against a backdrop of weeks of backups and canceled flights at Amsterdam’s Schiphol Airport as the busy aviation hub struggles with staff shortages also blamed on the pandemic.

“KLM colleagues battled their way through the COVID19-crisis in 2020 and 2021. The current operational situation at Schiphol is also demanding and again asks a great deal of our people and our customers. I’d like to sincerely thank everyone at KLM for their huge efforts,” Elbers said.

KLM slashed its workforce and cut costs to survive the pandemic and has seen air travel rebound since travel restrictions were eased, allowing it to fully pay back loans.

However, the carrier warned it is not yet out of the woods, with high inflation, rising costs, the war in Ukraine and ongoing COVID-19 infections casting a shadow over the future.

“As a result, KLM has decided to retain access to future credit” totaling 2.4 billion euros from the government and banks, but added that “current forecasts show that KLM has sufficient financial resources available for the years ahead.”

Earlier this month, the chief of the Air France-KLM airline alliance said it would take weeks or months to get new security staff in place to lighten pressure on the Amsterdam airport, which has seen flight cancellations, damaging delays and big travel headaches as global air travel rebounds from the COVID-19 pandemic.