fix connect leak