fixed parallelization issues