Fixed bug with error parsing