Added atomic operations safety