agent type hierarchy fix