Fix handling, and add battery notification