Fix array access