concurrency fix
Merge pull request #1116 from ahmetmircik/concurrencyBugFix

minor concurrency fix