fix the error messages to be more validating