Fixing problem with js loading