Performance fix in processChildren()