Fix data race