add checkChildBeforeParents.