Tesla is rolling out a software update that improves the longevity of the Model S and Model X’s batteries by optimizing the thermal management system of the flagship sedan and SUV’s battery packs.

The safety update is being rolled out to the Model S and X fleet as Tesla continues its investigation into an incident in Hong Kong, which involved a Model S catching fire. According to local media reports, the Model S was in a parking lot when its batteries ignited, resulting in a blaze that took firemen 45 minutes to extinguish. No injuries were reported in the incident.

Below is a statement from a Tesla spokesperson about the company’s investigation into the Hong Kong fire.

“Our team was on site to offer support to our customer and establish the facts of this incident. We are glad that everyone is safe. While our investigation with authorities is ongoing, we have found that only a few battery modules were affected and the majority of the battery pack is undamaged.

“Tesla battery packs are engineered with a state-of-the-art design so that in the very rare instance a fire does occur, it spreads very slowly and vents heat away from the cabin, alerting occupants that there is an issue and giving them enough time to exit the vehicle. The safety of our customers is our top priority, and if we do identify an issue, we will do whatever is necessary to address it,” the Tesla spokesperson noted.

The company added that the thermal management safety update is currently being rolled out as a precautionary measure for its flagship vehicles. While cases involving a Tesla fire are incredibly few compared to the number of internal combustion fires every year, the electric car maker noted that it is doing what it can to make its vehicles even less likely to catch fire. Below is a statement from a Tesla spokesperson.

“We currently have well over half a million vehicles on the road, which is more than double the number that we had at the beginning of last year, and Tesla’s team of battery experts uses that data to thoroughly investigate incidents that occur and understand the root cause. Although fire incidents involving Tesla vehicles are already extremely rare and our cars are 10 times less likely to experience a fire than a gas car, we believe the right number of incidents to aspire to is zero.

“As we continue our investigation of the root cause, out of an abundance of caution, we are revising charge and thermal management settings on Model S and Model X vehicles via an over-the-air software update that will begin rolling out today, to help further protect the battery and improve battery longevity,” the spokesperson said.

The safety update will be rolled out to the entire Model S and X fleet, which means even early-production vehicles like the Model S 40 and the Model X 60D should receive the optimizations. Tesla also noted that the thermal management updates will not have any effect on the peak charge rates for the flagship sedan and SUV. Thus, Model S and X owners could still enjoy charging their vehicles at peak rates of up to 150 kW from the Supercharger V2 network, which was made possible after Tesla introduced the On-Route Battery Warmup feature to the vehicles last month.