index fixed, scripts added in the right place