js script loading fix