Fix typo accessing wrong array