fix connect error bug