no longer crashing when database is down