fixed hierarchy bug