Fix reconnection freeze problem