thread safety... FIXED!
Merge pull request #296 from xeno-by/master

thread safety... FIXED!