Solved bug that occurried always when an element has no childs.