Got atomic code working consistently.