fix testmat