fix connect sample