solved parallelization bug