Fixed hierarchy bug