Fixed bug in hierarchical layout