Merge pull request #646 from bhariharan/unstable

Latest shared repo commit
Fix for deadlocks
Merge pull request #647 from bhariharan/master

Fix for deadlocks
Merge branch 'master' into unstable