hopefully fixes a horrid and subtle concurrency bug
Merge pull request #41 from fommil/master

concurrency