Improve error detection.