make sure nodes always have a parent node