Index: trunk/ippScripts/scripts/lap_science.pl
===================================================================
--- trunk/ippScripts/scripts/lap_science.pl	(revision 31494)
+++ trunk/ippScripts/scripts/lap_science.pl	(revision 31498)
@@ -237,4 +237,7 @@
 
 	# This is a hack to fix old exposures that have no object.
+	unless(defined($comment)) {
+	    $comment = '';
+	}
 	if ((!defined($object))||($object eq 'NULL')||($object eq '')) {
 	    if ($comment =~ /3pi_/) {
@@ -247,6 +250,10 @@
 	    }
 	    else {
-		$exposure->{data_state} = 'drop';
-		$exposure = update_this_exposure($exposure);
+		$exposure->{data_state} = 'new';
+		$exposure->{pairwise} = 0;
+		$exposure->{private} = 1;
+		$exposure->{pair_id} = 9223372036854775807;
+		update_this_exposure($exposure);
+		$counter++;
 		next;
 	    }
@@ -273,4 +280,5 @@
 	    $counter++;
 	}
+	print "ZZ: $exp_id $object $comment $matching{$object}{$comment}\n";
     }
 
@@ -280,4 +288,5 @@
 	foreach my $comment (keys %{ $matching{$object} }) {
 	    push @exp_ids_to_diff, $matching{$object}{$comment};
+	    print "$object $comment $matching{$object}{$comment} $indexing{$matching{$object}{$comment}} $exp_ids_to_diff[-1]\n";
 	}
 	@exp_ids_to_diff = sort { $indexing{$a} <=> $indexing{$b} } @exp_ids_to_diff;
@@ -293,5 +302,5 @@
 	    my $exp_A = ${ $exposures }[$indexing{$exp_id_A}];
 	    my $exp_B = ${ $exposures }[$indexing{$exp_id_B}];
-
+	    print "$exp_A $exp_B $exp_id_A $exp_id_B $indexing{$exp_id_A} $indexing{$exp_id_B}\n";
 	    $exp_A->{pairwise} = 1;
 	    $exp_A->{private} = 0;
@@ -310,4 +319,5 @@
     # Scan all exposures, and ensure that pairwise and private are set correctly
     foreach my $exposure (@$exposures) { 
+	print "YY: $exposure\n";
 	if ($exposure->{pairwise} && !($exposure->{pair_id})) {
 	    $exposure->{pairwise} = 0; # We marked it for pairwise diffs, but didn't match it. Probably an error.
@@ -317,5 +327,5 @@
 	}
 
-	$exposure = update_this_exposure($exposure);
+	update_this_exposure($exposure);
     }
     return(0);
