changes to caching to fix double loads