Index: /tags/ipp-20120216/psphot/src/psphotRadialProfileWings.c
===================================================================
--- /tags/ipp-20120216/psphot/src/psphotRadialProfileWings.c	(revision 33411)
+++ /tags/ipp-20120216/psphot/src/psphotRadialProfileWings.c	(revision 33412)
@@ -307,5 +307,11 @@
 	    // linearly interpolate to the radius at which we hit the sky, using the last flux and the limiting slope
 	    if (isfinite(lastFlux)) {
-		limitRadius = lastRadius + lastFlux / 3.0;
+                float interpolatedRadius = lastRadius + lastFlux / 3.0;
+                if (interpolatedRadius < MAX_RADIUS) {
+                    limitRadius = interpolatedRadius;
+                } else {
+                    // XXX should we keep going in this case?
+                    limitRadius = meanRadius;
+                }
 	    } else {
 		limitRadius = meanRadius;
Index: /tags/ipp-20120216/psphot/src/psphotSersicModelClass.c
===================================================================
--- /tags/ipp-20120216/psphot/src/psphotSersicModelClass.c	(revision 33411)
+++ /tags/ipp-20120216/psphot/src/psphotSersicModelClass.c	(revision 33412)
@@ -546,4 +546,8 @@
     // set the normalization by linear fit between model and data
     psphotSersicModelNorm (pcm, source);
+    if (!isfinite(PAR[PM_PAR_I0])) {
+        fprintf(stderr, "psphotSersicModelClassGuessPCM: psphotSerisicModelNorm set PM_PAR_I0 to NAN\n");
+        return false;
+    }
 
     if (TIMING) { t5 = psTimerMark ("SersicGuess"); }
