fixed a known data race in nqueens example