Fix what I assume was a race condition