fixed bug in hierarchy initialization