Fixed dependency generation for modules