Wrong variable used in dependency creation