Moved to use atomics.