fixed bugs in matrices and aug matxs