Fix little code miss that would lead the parfor body get error.
Merge branch 'tempfix' into simulate