Fixed cancelconnect bug