Fixed module generator

I messed up. Tried to modify components that didn't initialize.