fixed correctness bug: critical->atomic on reduction vars