Trying to reduce the likelihood of a race condition