minor fixes and error message changes