A new flaw has been discovered in the Boeing 737 Max 8 aircraft even as the US plane maker struggles to issue software updates to patch earlier oversights that directly led to two deadly air crashes.

Boeing is reportedly re-writing its 737 Max 8 piloting software from scratch, after the Federal Aviation Administration (FAA) brought attention to a new software issue, Business Insider reported Friday.

The FAA discovery comes as the US plane maker is scrambling to fix a software issue that led to two deadly air crashes in October 2018 and March 2019.

According to Business Insider, Boeing must rewrite its software and introduce “fundamental change,” to enable the plane to take input from both flight-control computers instead of just one – a practice that was standard on previous Boeing models for decades, the report says.

The 737 Max 8 automated anti-stall system was made dependent on two angle of attack sensors. However, when sensors provided conflicting data or malfunctioned, the software failed, resulting in pilots having no way of knowing of a sensor problem, because a corresponding alarm light was not made operational on most planes. Only planes with optional angle of attack monitors were wired so that the alarm light could function properly.

The FAA is currently facing scrutiny in the US Senate over how the faulty plane became certified in the first place. Earlier this week, FAA leaders were grilled by the Senate Appropriations Committee.

During the hearing, Senator Susan Collins raised concerns over “instances in which FAA managers appeared to be more concerned with Boeing’s production timeline, rather than the safety recommendations of its own engineers.

“We have been fully knowledgeable in dealing with the development of that plane,” Carl Burleson, the FAA deputy acting administrator, said. “It doesn’t mean that each decision we’ve made has always been perfect. But I do believe the fundamental process of how we went about certifying the [Boeing 737] Max was sound.”

The two Max 8 crashes took the lives of 346 people. The two catastrophes led to the grounding of the 737 Max 8 across the globe. According to Business Insider, Boeing hopes that airlines can return the planes to the air by 2020.