Fix INDEX generation