fixed bugs in parallel-do