prevent leakage of processes
prevent leakage of processes in parfor