fixing up some of the error messages etc