Off-by-one change, commented usage of "index" variable