add some bad error handling codes