Fixed error of string versus int for an array index