fix matrix2x2 and matrixMxN bug