fixes threads in OpenMP