Fixed bug introduced in commit c9402d9ecc1d063a96e583d82a07028aeadc49eb for local threads
Merge pull request #358 from rattoma/master

parallel bug fix