Index: /branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c
===================================================================
--- /branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c	(revision 34666)
+++ /branches/czw_branch/20120906/ppStack/src/ppStackCombinePrepare.c	(revision 34667)
@@ -26,8 +26,12 @@
     pmCell *cell = pmFPAfileThisCell(config->files, view, outName); // Output cell
     options->outRO = pmReadoutAlloc(cell); // Output readout
-    
-    pmCell *expCell = pmFPAfileThisCell(config->files, view, expName); // Exposure cell
-    options->expRO = pmReadoutAlloc(expCell); // Output readout
 
+    if (expName) {
+      pmCell *expCell = pmFPAfileThisCell(config->files, view, expName); // Exposure cell
+      options->expRO = pmReadoutAlloc(expCell); // Output readout
+    }
+    else {
+      options->expRO = NULL;
+    }
     pmCell *bkgCell;
     int bkg_r0,bkg_c0;
@@ -78,7 +82,9 @@
     }
 
-    if (!pmReadoutStackDefineOutput(options->expRO, col0, row0, numCols, numRows, true, true, 0)) {
+    if (expName) {
+      if (!pmReadoutStackDefineOutput(options->expRO, col0, row0, numCols, numRows, true, true, 0)) {
         psError(PPSTACK_ERR_ARGUMENTS, false, "Unable to prepare output.");
         return false;
+      }
     }
 
Index: /branches/czw_branch/20120906/ppStack/src/ppStackThread.c
===================================================================
--- /branches/czw_branch/20120906/ppStack/src/ppStackThread.c	(revision 34666)
+++ /branches/czw_branch/20120906/ppStack/src/ppStackThread.c	(revision 34667)
@@ -97,6 +97,4 @@
             psFree(resolved); \
         }
-	fprintf(stderr,"ppST:99 %s %s\n",pmConfigConvertFilename(imageNames->data[i], config, false, false),
-		(char*)imageNames->data[i]);
 		
         IMAGE_OPEN(imageNames, stack->imageFits, i);
Index: /branches/czw_branch/20120906/psModules/src/imcombine/pmStack.c
===================================================================
--- /branches/czw_branch/20120906/psModules/src/imcombine/pmStack.c	(revision 34666)
+++ /branches/czw_branch/20120906/psModules/src/imcombine/pmStack.c	(revision 34667)
@@ -1401,4 +1401,5 @@
       }
       combined->image->data.F32[y][x] = stats->robustMedian;
+      combined->mask->data.PS_TYPE_IMAGE_MASK_DATA[y][x] = 0;
     }
   }
