Swap the position of next and prev.