Fixing the error messages