United Airlines is making money after a slow start to the year.

The airline’s net income in the second quarter hit $789 million, topping Wall Street expectations and marking a turnaround from the first quarter when United was the only major U.S. carrier to report a loss.