Update index script loading location to prevent race