ExxonMobil Corp. (NYSE: XOM), the world’s largest publicly traded oil producer, posted a better-than-expected quarterly profit on April 28, helped by rising crude prices and cost cuts.

The results reflected the slowly improving dynamics for the company as well as the global energy industry, with oil prices up more than 50% since early 2015.

Still, pockets of weakness remained. ExxonMobil’s U.S. oil and gas division posted a loss. Plant repair costs pushed earnings down in the company’s chemical division, which had kept ExxonMobil profitable during the two-year oil price downturn.

Net income jumped to $4.01 billion, or 95 cents per share, from $1.81 billion, or 43 cents per share, in the year-ago quarter.

Analysts expected earnings of 85 cents per share, according to Thomson Reuters I/B/E/S.

Production fell 4% to 4.2 million barrels of oil equivalent per day.

The company gobbled up acreage and reserves across the globe during the quarter, with deals in Texas and Mozambique, part of a plan to expand ExxonMobil’s growth potential.

Exxon raised its quarterly dividend this week by 3%.

Shares of Texas-based Exxon rose 1.6% to $82.60 in premarket trading.