Fixed switch from atomics to atomic in rust