Fixed bugs about battery event