fix to filling of the tree