Fix dependency tree bug