Fix reconnect bug