added synchronization for thread wait
Merge branch 'master' of github.com:HCID/Multimodal2