fixed a few errors with the error parsing