Fix data race.