Fix resource caching