Correct error handling.