Merge pull request #338 from abigagli/master

Possible fix for deadlock @startup discussed in Merge pull request #332