Fixed wrong caching of resources