Fixed battery code

Battery wasn't being updated, works now