diff --git a/submit_trio_wes_checksums.sh b/submit_trio_wes_checksums.sh
index d91b877097483fbb2b72f9bbd5cafae598e15889..b67cba4ac6fd1f02bd68c23062ad02d100e372c3 100755
--- a/submit_trio_wes_checksums.sh
+++ b/submit_trio_wes_checksums.sh
@@ -25,9 +25,11 @@ source $CONFIG_SH
 
 FAMILY_ID=`head -n $PBS_ARRAY_INDEX $PARAMS_DIR/$PROJECT_ID.family_ids.txt | tail -n 1`
 
-# This assumes that ${PROJECT_ID}_${FAMILY_ID} is unique, and it should be - if there was
+BASE_PROJECT_ID=`echo $PROJECT_ID | cut -f 1 -d '_'`
+
+# This assumes that ${VERSION}_${PROJECT_ID}_${FAMILY_ID} is unique, and it should be - if there was
 # a re-run of a family, it should have a new project id.
-cd $OUTPUT_DIR/*${VERSION}_${PROJECT_ID}_${FAMILY_ID}*
+cd $OUTPUT_DIR/${VERSION}_${BASE_PROJECT_ID}/*${VERSION}_${PROJECT_ID}_${FAMILY_ID}*
 
 rm md5sum.txt 2> /dev/null
 
diff --git a/submit_trio_wes_cram_compression.sh b/submit_trio_wes_cram_compression.sh
index 467bcff276bcf6685c85301595ba98c85bbb0016..b0e8498bec1216a7b5673ec6a2278fbddbf154b2 100755
--- a/submit_trio_wes_cram_compression.sh
+++ b/submit_trio_wes_cram_compression.sh
@@ -25,9 +25,11 @@ source $CONFIG_SH
 
 FAMILY_ID=`head -n $PBS_ARRAY_INDEX $PARAMS_DIR/$PROJECT_ID.family_ids.txt | tail -n 1`
 
-# This assumes that ${PROJECT_ID}_${FAMILY_ID} is unique, and it should be - if there was
+BASE_PROJECT_ID=`echo $PROJECT_ID | cut -f 1 -d '_'`
+
+# This assumes that ${VERSION}_${PROJECT_ID}_${FAMILY_ID} is unique, and it should be - if there was
 # a re-run of a family, it should have a new project id.
-cd $OUTPUT_DIR/*${VERSION}_${PROJECT_ID}_${FAMILY_ID}*
+cd $OUTPUT_DIR/${VERSION}_${BASE_PROJECT_ID}/*${VERSION}_${PROJECT_ID}_${FAMILY_ID}*
 
 for BAM in */*.bam
 do