Fix connect error.