added guard condition to inner_children