fix pmatrix->bmatrix