Remove a potential race condition