Fixed a small index error