fix to handshake