Fix bugs and doc for matrixsequence