fixed error message printin