fix if db is down