Delta Air Lines reported $685 million in net income for the second quarter, swinging to a profit on lower fuel prices.

.

Excluding so-called “special items” such as charges to adjust the value of future fuel contracts and for fleet restructuring, Atlanta-based Delta said it would have a $844 million profit — a record June quarter result for the company.

But not all of company’s segments did well in the quarter. Delta’s passenger revenue grew 0.7 percent, but it had a decrease in cargo and other revenue, resulting in a $25 million decline to about $9.7 billion in total operating revenue for the quarter.

And the Trainer refinery that Delta acquired last year still has yet to break even or make a profit. Delta said the refinery in Pennsylvania generated a $51 million loss due to higher costs to meet renewable fuel standards. Chief financial officer Paul Jacobson in a memo to employees said the refinery strategy is still “producing meaningful fuel savings” for the airline.