Global airlines have scrambled to fix a software glitch on Airbus A320 jets as a partial recall by the European plane maker halted hundreds of flights in Asia and Europe and threatened US travel over the busiest weekend of the year.

Airlines worked through the night after global regulators told them to remedy the problem before resuming flights.

Several carriers on Saturday said they had finished or nearly completed the fix to their fleets, including American Airlines, Air India, Delta Air Lines and Hungary’s Wizz Air.

Many reported no effect on operations.

The overnight effort by airlines appeared to help head off the worst-case scenario and capped the number of flight delays in Asia and Europe.

The US will face high demand after the Thanksgiving holiday period.

“It’s not as chaotic as some people might think,” said Asia-based aviation analyst Brendan Sobie.

“But it does create some short-term headaches for operations.”

Airbus CEO Guillaume Faury apologised to airlines and passengers after the surprise recall of 6000 planes or more than half of the global A320-family fleet, which recently overtook the Boeing 737 as the industry’s most-delivered model.

“I want to sincerely apologise to our airline customers and passengers who are impacted now,” Faury posted on LinkedIn.

Friday’s alert followed an unintended loss of altitude on an October 30 JetBlue flight from Cancun, Mexico, to Newark, US which injured 10 passengers, according to France’s BEA accident agency, which is probing the incident.

The alert landed at a time of day when many European airlines and Asian airlines were winding down their schedules, which mostly do not require the short- to medium-haul jets like the A320 to be flying at night, leaving time for repairs.

In the United States, however, it came during the day ahead of the busy Thanksgiving holiday travel weekend.

Steven Greenway, CEO of Saudi carrier Flyadeal, said that the recall had hit late in the evening, which had avoided more serious disruption.

The airline said it had fixed all 13 affected jets and would resume normal operations by midnight.

“It was a great team effort but our luck also held up in the timing,” Greenway told Reuters.

Airlines must revert to a previous version of software in a computer that helps determine the nose angle of the affected jets and in some cases must also change the hardware itself, mainly on older planes in service.

By Saturday, Airbus was telling airlines that repairs to some of the A320 jets affected may be less burdensome than first thought, industry sources said, with fewer than the original estimate of 1000 needing the time-consuming hardware changes.

Even so, industry executives said the abrupt action was a rare and potentially costly headache at a time when maintenance is under pressure worldwide from labour and parts shortages.

There were also unresolved questions about the effect of solar flare radiation blamed for the JetBlue incident, which is being treated by French investigators as an “incident,” the lowest of three categories of potential safety emergency.

“Any operational challenges that come at short notice and affecting a large part of your operation is tough to deal with,” said UK-based aviation consultant John Strickland.

The fix must be completed before the planes can fly again with passengers, a process needing two to three hours per jet.

Globally, there are about 11,300 of the single-aisle jets in service, including 6440 of the core A320 model.

Those include some of the largest and busiest low-cost carriers.

Tracker data from Cirium and FlightAware showed most global airports operating with good-to-moderate levels of delays.