fixed preloader infinite loop