fix concurrent crash
Merge pull request #51 from lxdvs/nick/concurrent

fix concurrent crash