Fix charmatrix test