Trying to avoid race condition.