Race condition handling
Merge pull request #9 from suketk/master

Race condition handling