Fix index generator