fix reconnect bug.