fixed loops over subprocs