fixed the preloading of images