Fix bug in Hierarchy creation.