fix a bug of parameter generation in model generator.