somewhat more graceful error handling