Resolved hierarchy handling bug - logic error