fixed bug when caching images in chrome