Fixed hard use of std::atomic where I should have used the afio atomic.