Update index.md

fix the loop bug