Updated the error handling so that errors also go away