Fix modifiers of generated class