fixed issues with js loading