Bug fix in image preloader