Fixing another race condition