Fixed preload and optimized some code