Fixed battery bug (partly anyway).