fix bug about rowCapacity at MatrixFact