Made the error handler display the first error that occurred instead of the last.