The Lion Air jet that crashed into the Java Sea off Indonesia earlier this week had experienced problems with the sensors used to calculate altitude and speed on its previous flight, an issue that could help explain why the plane dove into the water.

Pilots on the nearly new Boeing Co. 737 Max reported the issue after flying from Denpasar to Jakarta the night before the accident, Lion Air spokesman Danang Mandala Prihantoro said Wednesday. The instruments were checked by maintenance workers overnight and the plane was cleared to fly, Prihantoro said.

While it will be days or weeks before definitive information emerges in the crash shortly after takeoff with 189 people aboard, discrepancies in speed and altitude readings can cause confusion on the cockpit and have led to accidents in the past, including the 2009 crash of an Air France plane in the Atlantic Ocean.