Make unit updates atomic