Fix connect error