Fixed an array access mistake