Bugfixing about battery event