Bug fix in generate_flights.