Reordering some updates to avoid race conditions that are clobbering each other