fix indice bug