added some more graceful failure stuff