Fixed a bug in the dependency generator
Fixed another subtle bug in the dep generator