Fixed the preloading of images