Fixed bugs in the caching of map thumbnails