improved waiting

not strictly necessary, but cleaner in case of multiple childs