scripts - fixing build-index script