tweaking the graceful failure code