Index: /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm
===================================================================
--- /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 26149)
+++ /trunk/PS-IPP-PStamp/lib/PS/IPP/PStamp/Job.pm	(revision 26150)
@@ -580,7 +580,10 @@
     }
 
-    # If there are multiple cam runs for this exposure, take the last one
-    # assuming that it has the best astrometry 
-    my $camdata = pop @$camruns;
+    # If there are multiple cam runs for this exposure, take the last completed one
+    # on the assumption that it has the best astrometry.
+    my $camdata;
+    while ($camdata = pop @$camruns) {
+        last if $camdata->{state} eq "full";
+    }
     if (!$camdata) {
         # no cam runs for this exposure id therefore best astrometry is whatever is in the header
