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