improve handshake [ci skip]