fix error where parent items were not being correctly assigned
fix error where parent items were not being correctly assigned

lfairchild/PmagPy,lfairchild/PmagPy,Caoimhinmg/PmagPy,Caoimhinmg/PmagPy,lfairchild/PmagPy,Caoimhinmg/PmagPy