try to fix data race
Merge pull request #1134 from thockin/race

try to fix data race