Fix the item numeber index
[fix] Incorrect loop condition