Fixed a calculation error in the Battery Plugin