fix for js loading after images