Index: trunk/psphot/src/psphotSubtractBackground.c
===================================================================
--- trunk/psphot/src/psphotSubtractBackground.c	(revision 21183)
+++ trunk/psphot/src/psphotSubtractBackground.c	(revision 23287)
@@ -4,5 +4,5 @@
 // generate the median in NxN boxes, clipping heavily
 // linear interpolation to generate full-scale model
-bool psphotSubtractBackground (pmConfig *config, const pmFPAview *view, const char *filename) 
+bool psphotSubtractBackground (pmConfig *config, const pmFPAview *view, const char *filename)
 {
     bool status = true;
@@ -31,5 +31,5 @@
     assert (maskVal);
 
-    psImageBinning *binning = psMetadataLookupPtr(&status, recipe, "PSPHOT.BACKGROUND.BINNING");
+    psImageBinning *binning = psMetadataLookupPtr(&status, model->analysis, "PSPHOT.BACKGROUND.BINNING");
     assert (binning);
 
