Fixed index building in generator