model generator fix