Fixed a connect bug