error message handling correction