adding name to define module when missing a name, rewriting global to match dep name