fix script index