Index: /tags/ipp-20130307/pstamp/scripts/pstamp_checkdependent.pl
===================================================================
--- /tags/ipp-20130307/pstamp/scripts/pstamp_checkdependent.pl	(revision 35498)
+++ /tags/ipp-20130307/pstamp/scripts/pstamp_checkdependent.pl	(revision 35499)
@@ -344,4 +344,5 @@
 }
 
+if (0) {
     my $tess_id = $metadata->{tess_id};
     if ($tess_id eq 'RINGS.V0') {
@@ -349,4 +350,5 @@
         return $PSTAMP_GONE
     }
+}
     if (($state =~ /error/) or ($state =~ /purged/) or ($state =~ /scrubbed/) or ($state eq 'drop') or
          ($data_state =~ /error/) or ($data_state =~ /purged/) or ($data_state =~ /scrubbed/) or ($data_state eq 'drop')) {
Index: /tags/ipp-20130307/pstamp/scripts/pstamp_job_run.pl
===================================================================
--- /tags/ipp-20130307/pstamp/scripts/pstamp_job_run.pl	(revision 35498)
+++ /tags/ipp-20130307/pstamp/scripts/pstamp_job_run.pl	(revision 35499)
@@ -151,4 +151,5 @@
         } elsif ($params->{cmf}) {
             $argString .= " -write_cmf";
+            $fileArgs  .= " -sources $params->{cmf}";
             push @file_list, $params->{cmf};
         } else {
Index: /tags/ipp-20130307/pstamp/src/ppstampMakeStamp.c
===================================================================
--- /tags/ipp-20130307/pstamp/src/ppstampMakeStamp.c	(revision 35498)
+++ /tags/ipp-20130307/pstamp/src/ppstampMakeStamp.c	(revision 35499)
@@ -359,9 +359,11 @@
 
         if (options->writeCMF) {
-            pmReadout *astromReadout = NULL;
+            pmReadout *sourcesReadout = NULL;
             if (astrom->fpa != input->fpa) {
-                astromReadout = pmFPAviewThisReadout(srcView, astrom->fpa);
-            }
-            if (!copySources(outReadout, astromReadout, astromReadout, extractRegion)) {
+                sourcesReadout = pmFPAviewThisReadout(srcView, astrom->fpa);
+            } else {
+                sourcesReadout = readout;
+            }
+            if (!copySources(outReadout, sourcesReadout, sourcesReadout, extractRegion)) {
                 psError(PS_ERR_UNKNOWN, false, "failed to extract sources from region of interest.\n");
                 status = false;
@@ -784,4 +786,8 @@
 
     // first look for detections in the input readout. Those would have come from the -sources file
+    if (!inReadout->analysis) {
+        psLogMsg("ppstampMakeStamp", PS_LOG_WARN, "no analysis metadata found on input\n");
+        return false;
+    }
     pmDetections *inDetections = psMetadataLookupPtr (&status, inReadout->analysis, "PSPHOT.DETECTIONS");
     if (!inDetections) {
Index: /tags/ipp-20130307/pstamp/src/ppstampParseCamera.c
===================================================================
--- /tags/ipp-20130307/pstamp/src/ppstampParseCamera.c	(revision 35498)
+++ /tags/ipp-20130307/pstamp/src/ppstampParseCamera.c	(revision 35499)
@@ -119,5 +119,5 @@
         // see if -sources file was supplied. 
         // If so define the file.
-        psPtr sourcesFile = psMetadataLookupStr(&status, config->arguments, "SOURCES");
+        psPtr sourcesFile = psMetadataLookupPtr(&status, config->arguments, "SOURCES");
         if (sourcesFile) {
             pmFPAfile *sources = pmFPAfileBindFromArgs(&status, input, config, "PPSTAMP.INPUT.SOURCES", "SOURCES");
