Fixes NameTree reading
Merge pull request #2868 from yurydelendik/issue-2867

Fixes NameTree reading