fixed bug with js script loading in html