fix generating metavar