Fixed handshake issues when switching servers.