improved handling of empty batteries