Fix major hiearchial bug