fixed wrong error messages