Swap root index