fixed incorrect indexing

issue