Fixed exception when connection during failover