fix model generator