removed auto-connect bug and cancel bug