Fixed a bug in the atomic op for simple addition/fetching and changed its behavior, and fixed the Barrier.