bugfix in initial handshake