fix the end tag on index