Fixing a significant source of race conditions.