Diamond Offshore Drilling Inc. (NYSE: DO) posted a smaller-than-expected loss on July 30, as a fall in revenue was offset by a 15% drop in costs.

The Houston-based company’s total operating expenses fell to $321.2 million from $378.5 million, a year earlier.

As oil prices stay above $70 a barrel, oil and gas producers are again showing an interest in expensive offshore projects that can take up to a decade to develop.

The rig contractor recorded a loss of $69.27 million, or 50 cents per share, in the second quarter ended June 30, compared to a profit of $15.95 million, or 12 cents per share, a year earlier.

Excluding items, the company posted a loss of 33 cents per share. Analysts on average were expecting the company to lose 39 cents per share, according to Thomson Reuters I/B/E/S.

Total revenue fell to $268.86 million from $399.29 million.