Fix model caching