Wrong array index