fix connect()