Improve charging detection.