Fix for Handling dependencies
Merge pull request #955 in master
Merge pull request #930
Merge pull request #930 in develop