Fix errors when creating new module