Fix dependency difference query