Corrected invert() method in paolMat