fix reconnection problem