math batteryCharger calculation fix