Merge pull request #645 from bhariharan/master

Latest shared repo commit
Fix for deadlocks