PG&E suffered a fourth-quarter loss, burdened by natural gas pipeline costs and penalties, as well as environmental expenses at a gas compressor station, in a report that caused the company’s shares to nose-dive Thursday.

San Francisco-based PG&E lost $13 million during the October-December fourth quarter, compared to a year-ago profit of $83 million.

Excluding the one-time costs from the environmental opertations, PG&E earned 59 cents a share from its operations. Analysts had been expecting earnings of 60 cents a share.

“Our results continue to reflect the significant impact of legacy issues, but we are encouraged by our continued progress in building a stronger utility to serve our customers,” said Tony Earley, Chairman, CEO, and President of PG&E Corporation.

PG&E has been upgrading its pipeline system after a fatal natural gas explosion in San Bruno in 2010.

The total cost for natural gas pipeline-related actions since the San Bruno accident in 2010 is now approximately $1.4 billion on a pre-tax basis. All of those expenses have been borne by PG&E’s shareholders, the utility said.

The company expects to undertake infrastructure investments of $4.5 billion to $6.0 billion per year during 2014, 2015 and 2016 period in order to maintain safe and reliable electric and gas service.

PG&E also anticipates needing substantial amounts of equity to fund a portion of these investments.

The company pointed to 2014 as a year for it “to significantly recover from the uncertainties of the past several years, pending resolution of the San Bruno investigations and the company’s 2014 general rate case,” PG&E said as part of its earnings statement.

For all of 2012, PG&E earned $816 million. That was down 3.3 percent from 2011.

“In 2012, we accomplished all of our ambitious work plans aimed at making us a better performing company,”: Earley said. “We are starting to transition from the uncertainties of the past couple of years, and regain the confidence and support of our customers and our other stakeholders.”

Otto Warmbier was arrested in January 2016 at the end of a brief tourist visit to North Korea. He had been medically evacuated and was being treated at the University of Cincinnati Medical Center when he died at age 22.