Fixed image loading and caching.