fixing issue with reassignment of parent id for hierarchical connections