Index: trunk/ppStack/src/ppStackLoop.c
===================================================================
--- trunk/ppStack/src/ppStackLoop.c	(revision 26076)
+++ trunk/ppStack/src/ppStackLoop.c	(revision 26106)
@@ -106,15 +106,4 @@
     ppStackMemDump("final");
 
-    // Clean up
-    psTrace("ppStack", 2, "Cleaning up after combination....\n");
-    if (!ppStackCleanup(stack, options, config)) {
-        psError(PS_ERR_UNKNOWN, false, "Unable to clean up.");
-        psFree(stack);
-        psFree(options);
-        return false;
-    }
-    psLogMsg("ppStack", PS_LOG_INFO, "Stage 6: WCS & JPEGS: %f sec", psTimerClear("PPSTACK_STEPS"));
-    ppStackMemDump("cleanup");
-
     psFree(stack);
 
@@ -136,5 +125,5 @@
             return false;
         }
-        psLogMsg("ppStack", PS_LOG_INFO, "Stage 7: Unconvolved Stack: %f sec", psTimerClear("PPSTACK_STEPS"));
+        psLogMsg("ppStack", PS_LOG_INFO, "Stage 6: Unconvolved Stack: %f sec", psTimerClear("PPSTACK_STEPS"));
         ppStackMemDump("unconv");
 
@@ -143,4 +132,15 @@
     psFree(options->cells); options->cells = NULL;
 #endif
+
+    // Clean up
+    psTrace("ppStack", 2, "Cleaning up after combination....\n");
+    if (!ppStackCleanup(stack, options, config)) {
+        psError(PS_ERR_UNKNOWN, false, "Unable to clean up.");
+        psFree(stack);
+        psFree(options);
+        return false;
+    }
+    psLogMsg("ppStack", PS_LOG_INFO, "Stage 7: Cleanup, WCS & JPEGS: %f sec", psTimerClear("PPSTACK_STEPS"));
+    ppStackMemDump("cleanup");
 
     // Photometry
