Fixing a possible race condition.