Fix model json generation