preloader work and other bug fixes