fixed connect bug