Index: branches/simmosaic_branches/ppImage/src/ppImageReplaceBackground.c
===================================================================
--- branches/simmosaic_branches/ppImage/src/ppImageReplaceBackground.c	(revision 24860)
+++ branches/simmosaic_branches/ppImage/src/ppImageReplaceBackground.c	(revision 27839)
@@ -74,5 +74,5 @@
     pmReadout *modelRO = NULL;
     pmFPAfile *modelFile = psMetadataLookupPtr(&status, config->files, "PSPHOT.BACKMDL"); // Background model
-    if (modelFile) {
+    if (modelFile && modelFile->fpa) {
         modelRO = pmFPAviewThisReadout(&roView, modelFile->fpa); // Background model
     }
@@ -80,5 +80,5 @@
     // the background model has not been defined, or at least not generated
     if (!modelFile || !modelRO) {
-        if (!psphotModelBackground(config, &roView, "PPIMAGE.CHIP")) {
+        if (!psphotModelBackgroundReadoutFileIndex(config, &roView, "PPIMAGE.CHIP", 0)) {
             psError(PS_ERR_UNKNOWN, false, "Unable to model background");
             return false;
