Battery: fix error when no battery available