Boeing on Saturday confirmed the flight-control software fixes that it plans to make for its grounded 737 Max 8, the plane involved in two fatal accidents within five months.

The company is tweaking the system designed to prevent an aerodynamic stall if sensors detect that the plane’s nose is pointed too high. After the update, the system will rely on data from more than one sensor before it automatically pushes the plane’s nose lower. The system won’t repeatedly push the nose down, and it will reduce the magnitude of the change.

Boeing said it will pay to train airline pilots.

The Federal Aviation Administration expects Boeing’s update next week. The Wall Street Journal reported Saturday that regulators tentatively approved Boeing’s changes, subject to flight tests, citing government documents and people familiar with the details. FAA declined to comment.

Airlines worldwide grounded the jet after the deadly crash of an Ethiopian Airlines flight this month. It came less than five months after 189 people died in the October crash of another Max 8 off the coast of Indonesia.