fixed reconnection in client