Fix output issues in parallel

Fixes #67.