Subject: [PATCH] fixes for handling multiple protocols in handshake