diff --git a/src/.docker_modules/r-bolero/1.0/HBV_RNAs_count.R b/src/.docker_modules/r-bolero/1.0/HBV_RNAs_count.R
index 16d8b1d8cbbc7aff4d56551a04e78cb060980aea..e3ef7f8f9517421f342245e678c3ae3790e5a559 100644
--- a/src/.docker_modules/r-bolero/1.0/HBV_RNAs_count.R
+++ b/src/.docker_modules/r-bolero/1.0/HBV_RNAs_count.R
@@ -240,20 +240,21 @@ count_clear <- dplyr::inner_join(palette_complete,
 #names(count_clear)
 count_clear$nom <- factor(count_clear$nom, levels = all_species_name)
 
-ggplot(count_clear, aes(x = "percent", 
-                        y = proportion,
-                        fill = nom)) +
-  geom_col() +
-  coord_polar("y") +
-  scale_fill_manual(values = count_clear$teinte) +
-  labs(fill = "spliced-variants")
-
-ggsave(file = paste0(opt$barcode, "_SP_clear_proportion_piechart.png"),
-       scale = 2,
-       width = 1920,
-       height = 1080,
-       units = "px",
-       dpi = 300)
+if(nrow(count_clear)!=0){
+  ggplot(count_clear, aes(x = "percent", 
+                          y = proportion,
+                          fill = nom)) +
+    geom_col() +
+    coord_polar("y") +
+    scale_fill_manual(values = count_clear$teinte) +
+    labs(fill = "spliced-variants")
+  
+  ggsave(file = paste0(opt$barcode, "_SP_clear_proportion_piechart.png"),
+         scale = 2,
+         width = 1920,
+         height = 1080,
+         units = "px",
+         dpi = 300)}
 
 ggplot(count_clear, aes(x = nom, 
                         y = proportion,
diff --git a/src/bolero.nf b/src/bolero.nf
index 636079d4f2ad74ad7a570a6cbc961b3678455232..cf3605d0115d8daad8fe5370839c745723a23d33 100755
--- a/src/bolero.nf
+++ b/src/bolero.nf
@@ -263,10 +263,19 @@ workflow {
   //#################### VARIANTS D'EPISSAGE ####################
 
   jwr_checker(sort_index_bam.out.indexed_bam)
-  junctions_nanosplicer(start_position_individuals.out.classification_of_reads, jwr_checker.out.nanosplicer_jwr)
+
+  start_position_individuals.out.classification_of_reads
+    .combine(jwr_checker.out.nanosplicer_jwr, by: 0)
+    .set{files_for_nanosplicer}
+
+  junctions_nanosplicer(files_for_nanosplicer)
   
   //#################### VARIANTS D'EPISSAGE ####################
 
-  rna_count(junctions_nanosplicer.out.identified_SPvariants, start_position_individuals.out.classification_of_reads)
+  junctions_nanosplicer.out.identified_SPvariants
+    .combine(start_position_individuals.out.classification_of_reads, by: 0)
+    .set{files_for_rna_count}
+
+  rna_count(files_for_rna_count)
 
 }