small improvement to indices fix