fixed error message parsing