Fix race condition on RegisterService.Read and Write