Fix multiple thread issues.
Merge pull request #14 from agorrod/sue.develop

Fix multiple thread issues.