Fix hierarchical check