fix some error string parsing