fix the connection reattached and drag to another endpoint bug.