Fixed small shared variable OpenMP problem