error messages retured properly