updated error parsing