fixed reconnection problem