Over the past couple of iPhone versions users have complained of “unexpected” shutdowns of their devices. Some iPhone 6, 6s, 6 Plus and 6s Plus devices could basically go dark unexpectedly, forcing a user to have to plug them into an outlet to get them to power back on.

Apple has been working on this very annoying bug and it says that it has come up with a fix of sorts that should mitigate the problem on a majority of iPhone 6 and iPhon 6s devices. The fix is actually already on your iPhone if you have installed iOS 10.2.1 — something around 50% of iOS users have already done. After letting the fix simmer on customer devices, Apple now has statistics to share on how it has improved the issue, citing 80% reduction on iPhone 6S and 70% reduction on iPhone 6 devices.

Currently, iPhone 7 devices are not impacted by this issue. It’s also important to note that there was a similar but different issue that had the same unexpected shutdown symptoms late last year that resulted in a battery recall of some devices. These are not the same issue or fix.

Here is the comment they provided TechCrunch with today:

With iOS 10.2.1, Apple made improvements to reduce occurrences of unexpected shutdowns that a small number of users were experiencing with their iPhone. iOS 10.2.1 already has over 50% of active iOS devices upgraded and the diagnostic data we’ve received from upgraders shows that for this small percentage of users experiencing the issue, we’re seeing a more than 80% reduction in iPhone 6s and over 70% reduction on iPhone 6 of devices unexpectedly shutting down.

We also added the ability for the phone to restart without needing to connect to power, if a user still encounters an unexpected shutdown. It is important to note that these unexpected shutdowns are not a safety issue, but we understand it can be an inconvenience and wanted to fix the issue as quickly as possible. If a customer has any issues with their device they can contact AppleCare.

As far as I’m able to understand what happened here, Apple found that sudden spikes of activity to the maximum power draw could cause older batteries which had some mileage on them to deliver power in an uneven manner which would cause an emergency shutdown of the devices. Brand new batteries would not be affected, but as most phone batteries run through charge cycles they get less effective (this is a well known byproduct of lithium ion technology and one reason everyone wants to get rid of it as soon as someone figures out something better) and more susceptible to these kinds of triggering spikes.

Whatever tweaks Apple made to its power management system have enabled them to reduce the shutdowns heavily — but not eliminate them entirely. For those cases where a device still shuts down, folks will be able to restart without having to plug it in on iPhone 6s and 6s Plus devices.

It’s also my understanding that there is a fix in on the newer beta versions of iOS that should allow the auto-restart in iPhone 6 Plus and iPhone 6 models as well.

At some point a battery will be so worn out that it will need to be replaced, as Apple outlines on its site. A new ‘your battery needs service’ message is also coming to the battery info screen inside Settings on iOS 10.2.1 over the next few days. This will only show up for batteries that Apple feels need it — which will add a bit more transparency to people wondering when Apple considers the battery worn down enough to get swapped out. Though the exact metrics by which it decides that a battery has reached end-of-life are still opaque, Apple does give some hints on its own page about maximum charges and lifetime.

While the issue has not been killed off entirely, this should provide some sort of relief for users who were being annoyed by the problem.