fix recursive loops in sub-classes