repaired template index