Fix cincurency issue
Merge pull request #168 from malakasilva/master

Fix cincurency issue