Index: trunk/psphot/src/psphotStack.c
===================================================================
--- trunk/psphot/src/psphotStack.c	(revision 34283)
+++ trunk/psphot/src/psphotStack.c	(revision 34528)
@@ -2,4 +2,8 @@
 
 int main (int argc, char **argv) {
+
+    // Set flag to tell certain library functions that we are in the psphotStack program. 
+    // (This is defined in psphotDefineFiles.c)
+    psphotINpsphotStack = true;
 
     // uncomment to turn on memory dumps (move this to an option)
