Fixes to module creation.