Fix issue in getDirectDependencies