Bug fixes

Fixed a bug that caused the wrong calculation of nparallels
when not waiting for results.