DETROIT -- Engineers at General Motors have figured out how to fix a battery problem with the Chevrolet Bolt electric hatchback that caused five of them to catch fire.

The company says they developed diagnostic software to look for anomalies in the batteries of 69,000 Bolts worldwide from the 2017 through 2019 model years. If problems are found, the company will replace faulty parts of the battery.

GM says owners of 2019 Bolts can get the software Thursday, and those who own 2017 and 2018 models can get it by the end of May.

In November GM recalled the electric vehicles after getting reports of the fires. Two people suffered smoke inhalation and a house was set ablaze.

At first the company didn't know what was causing the problem, but it determined that batteries that caught fire were near a full charge. So as a temporary fix, owners and dealers were told to make software changes to limit charging to 90% of a battery's capacity. U.S. safety regulators said the cars should be parked outdoors until the temporary fix was completed.

GM traced the fires to what it called a rare manufacturing defect in battery modules. It can cause a short in a cell, which can trigger a fire. Under the remedy, dealers can diagnose battery issues, and they'll install diagnostic software that will warn owners of any problems, spokesman Dan Flores said.

The company said it is not aware of any fires in vehicles that got the interim fix.

"We extensively validated the software to detect potential battery issues and protect our customers," Flores said.

Each Bolt has 288 battery cells, and engineers worked to analyze data from hundreds of thousands of cells, Flores said.

The recall came after the U.S. National Highway Traffic Safety Administration opened an investigation into the fires last year. The agency said in documents that the fires began under the rear seat while the cars were parked and unattended.

Engineers determined the fires took place in Bolts with battery cells made at an LG Chem factory in Ochang, South Korea, from May of 2016 to May of 2019.

Some 2019 Bolts and all 2020 and 2021 versions have cells made at an LG Chem plant in Holland, Michigan, and are not included in the recall.

Once the final recall repairs are made, the Bolts' full range will be restored. Older Bolts can go about 238 miles (383 kilometres) per charge.