fixed a missing dtype
added test for chmatrix