Facebook
A 3D plastic representation of the Facebook logo is seen in this illustration in Zenica, Bosnia and Herzegovina, May 13, 2015. Reuters/Dado Ruvic

If your iPhone battery had a tendency to quickly drain in the past, chances are the Facebook app was one of the culprits. In response to user complaints, the social networking company admitted to the problem and said it has fixed some of the software bugs contributing to shorter battery life.

According to Facebook engineering manager Ari Grant, there were a couple problems with the app causing battery drain. The first issue was something called “CPU spin” in the networking code of the software. “A CPU spin is like a child in a car asking, ‘Are we there yet? Are we there yet? Are we there yet?’ with the question not resulting in any progress to reaching the destination,” Grant wrote on the social networking site. ”This repeated processing causes our app to use more battery than intended.”

The second cause for battery drain was attributed to how the app dealt with audio playback. When users left the Facebook app after watching a video, the audio session would sometimes stay open as if were playing sound silently in the background. While there was no actual audio playback in the background, by being open the session would increase battery drain.

Grant also noted that the battery drain issues weren’t being caused by Facebook’s location history feature or location tracking, despite reports from Motherboard and other publications pointing to the contrary.

Prior to the fix, some iOS users sought various stop-gaps to fix the battery drain problem, such as disabling location services for the Facebook app or using the social network exclusively through the Safari web browser instead of the app.