bugfix: client not connected, error in initiateHandshake()