Replaced AA[, index] instead of AA[, index, drop=FALSE]