Index: trunk/magic/remove/src/Makefile.simple
===================================================================
--- trunk/magic/remove/src/Makefile.simple	(revision 20579)
+++ trunk/magic/remove/src/Makefile.simple	(revision 20580)
@@ -13,5 +13,5 @@
 streaksremove:  ${OBJECTS}
 
-install:
+install:	streaksremove
 	cp streaksremove $(PSCONFDIR)/$(PSCONFIG)/bin
 	chmod 755  $(PSCONFDIR)/$(PSCONFIG)/bin/streaksremove
Index: trunk/magic/remove/src/streaksremove.c
===================================================================
--- trunk/magic/remove/src/streaksremove.c	(revision 20579)
+++ trunk/magic/remove/src/streaksremove.c	(revision 20580)
@@ -1244,4 +1244,9 @@
 excisePixel(streakFiles *sfiles, unsigned int x, unsigned int y, double newMaskValue)
 {
+    // we clip so that the streak calculation code doesn't have to
+    if ((x < 0) || (x >= sfiles->inImage->numCols) || (y < 0) || (y >= sfiles->inImage->numRows)) {
+        return;
+    }
+
     double imageValue  = psImageGet (sfiles->inImage->image,  x, y);
     psImageSet (sfiles->recImage->image,  x, y, imageValue);
@@ -1316,5 +1321,12 @@
     }
 
+    // we clip so that the streak calculation code doesn't have to
+    if ((cellCoord->x < 0) || (cellCoord->x >= sfiles->inImage->numCols) ||
+        (cellCoord->y < 0) || (cellCoord->y >= sfiles->inImage->numRows)) {
+        return false;
+    }
+
     cellToChip(&chipCoord, sfiles->astrom, cellCoord);
+
 
     return psImageGet(sfiles->warpedPixels, chipCoord.x, chipCoord.y) ? true : false;
