Fix in setting number of threads in openMP