output wrong error messages, fixed