Fixes for tunnel handshake