Made changes to error parsing