Index: trunk/psLib/src/imageops/psImageMapFit.c
===================================================================
--- trunk/psLib/src/imageops/psImageMapFit.c	(revision 24090)
+++ trunk/psLib/src/imageops/psImageMapFit.c	(revision 24091)
@@ -308,6 +308,5 @@
 # endif
 
-    if (!psMatrixGJSolveF32(A, B)) {
-        psAbort ("failed on linear equations");
+    if (!psMatrixGJSolve(A, B)) {
         psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.  Returning NULL.\n");
         psFree (A);
@@ -577,9 +576,9 @@
     }
 
-    if (!psMatrixGJSolveF32(A, B)) {
-        psAbort ("failed on linear equations");
-        psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.  Returning NULL.\n");
+    if (!psMatrixGJSolve(A, B)) {
+        psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.\n");
         psFree (A);
         psFree (B);
+	psFree (Empty);
         return false;
     }
@@ -725,9 +724,9 @@
     }
 
-    if (!psMatrixGJSolveF32(A, B)) {
-        psAbort ("failed on linear equations");
-        psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations.  Returning NULL.\n");
+    if (!psMatrixGJSolve(A, B)) {
+        psError(PS_ERR_UNKNOWN, false, "Could not solve linear equations..\n");
         psFree (A);
         psFree (B);
+	psFree (Empty);
         return false;
     }
@@ -742,7 +741,6 @@
 
     for (int m = 0; m < Nx; m++) {
-        int I = m; // XXX I'm not entirely sure about this; it wasn't set for this scope --- PAP.
-        map->map->data.F32[0][m] = B->data.F32[I];
-        map->error->data.F32[0][m] = sqrt(A->data.F32[I][I]);
+        map->map->data.F32[0][m] = B->data.F32[m];
+        map->error->data.F32[0][m] = sqrt(A->data.F32[m][m]);
     }
 
