Repaired a bug in the index template