Fixed bug in error parsing