Fixed bug where index creation repeats first index column