fix SparseVector.toArray