- memory corruption fix.
Merge pull request #194 from nem0/multithread_refactor

- memory corruption fix.