fix caching of nil images