missing a synchronized
Merge pull request #47 from twillouer/multithreaderrors

error on multithreading