A United Airlines plane headed for San Francisco was forced to go back to Hawaii on Sunday after strong winds they didn’t predict threatened to exhaust all of the plane’s fuel or at least push it past the legal limit.

United Flight 724 carrying 263 passengers and 12 crew members landed safely at Honolulu airport on Sunday after the ‘strong headwinds’ caused the flight to turn around after two hours, according to ABC.

FlightAware mapped out the path of the airplane that was turned around by crew who were following the rules about the legal amount of fuel.

‘When the headwinds are greater than what were expected, and are going to be sustained for four or five hours of flight, you’re simply not going to be able to land with your legal minimum of fuel,’ ABC aviation expert John Nance said.