if first page parent was undefined
this should fix that issue