fixes to models and caching