fixed openmp parallelization