adding some fixes for the image caching