fix bug: swap node in pari