fixed shortcomings with preloader functionality