Wait correctly when the child finishes, instead of waiting for 1s