Fix metamodel generation