fix for case when no childs