Fix some races found by -race.