fixed the logic of getting batch child processes