Fixed error in battery script