Fix handshaking