Fixed up so OpenMP barriers can be reused