fix hierarchy checks