fixed small bug due to GNU openmp bug when run with 1 thread