Cleanup the error handling and control reset