Changing history of nodes traversed from vector<Page*> to vector<PageId*>