error parsing improvements

error parsing improvements