fix connect on windows