Fixing error of caching images