Index: trunk/psModules/src/imcombine/pmStackReject.c
===================================================================
--- trunk/psModules/src/imcombine/pmStackReject.c	(revision 16403)
+++ trunk/psModules/src/imcombine/pmStackReject.c	(revision 16419)
@@ -113,5 +113,5 @@
 
     // Now, grow the mask to include everything that touches a bad pixel in the convolution
-    mask = psPixelsToMask(NULL, bad, psRegionSet(0, numCols, 0, numRows), 0xff);
+    mask = psPixelsToMask(NULL, bad, psRegionSet(0, numCols - 1, 0, numRows - 1), 0xff);
     for (int i = 0; i < bad->n; i++) {
         int xPix = bad->data[i].x, yPix = bad->data[i].y; // Coordinates of interest
