[x] Fixed an index error