fixed handshake issues