fix db failover