Fixed bug in hierarchical example