Improved the problem detection.