Bad logic on battery state