set parents before assigning value to child nodes - issue #121