Fix mogenerator.