fixing index scripts