Improve battery handling