diff --git a/conf/hicstuff.config b/conf/hicstuff.config
index 3f5cdf60468e3f2ce4fca93cfdc5340f7be71a4d..f036e4c364a8b28dad17a7133adcb3d07a8537fb 100644
--- a/conf/hicstuff.config
+++ b/conf/hicstuff.config
@@ -350,6 +350,7 @@ profiles {
     }
     docker {
         docker.enabled         = true
+        docker.registry        = 'quay.io'
         docker.userEmulation   = true
         singularity.enabled    = false
         podman.enabled         = false
diff --git a/subworkflows/local/hicstuff_sub.nf b/subworkflows/local/hicstuff_sub.nf
index 221d646e146492372ffa28f15a4cac4c2fd7160e..28d383e63f58f9d1602ffbec1250b088fff7cbbd 100644
--- a/subworkflows/local/hicstuff_sub.nf
+++ b/subworkflows/local/hicstuff_sub.nf
@@ -8,11 +8,7 @@ include { BUILD_MATRIX_COOL_ALT } from '../../modules/local/hicstuff/build_matri
 include { FILTER_EVENT } from '../../modules/local/hicstuff/filter_event'
 include { DISTANCE_LAW } from '../../modules/local/hicstuff/distance_law'
 include { FILTER_PCR } from '../../modules/local/hicstuff/filter_pcr'
-include { SAMTOOLS_SORT } from '../../modules/nf-core/custom/samtools/sort/main'
-include { SAMTOOLS_SORT_N } from '../../modules/nf-core/custom/samtools_n/sort/main'
-include { FILTER_PAIR } from '../../modules/local/filterbam/main'
-include { SAMTOOLS_INDEX } from '../../modules/nf-core/custom/samtools/index/main'
-include { PICARD_MARKDUPLICATES } from '../../modules/nf-core/custom/picard/markduplicates/main'
+include { FILTER_PCR_DUP } from './filter_pcr_dup'
 
 // Paired-end to Single-end
 def pairToSingle(row, mates) {
@@ -65,32 +61,12 @@ workflow HICSTUFF_SUB {
         error "Error: filter_pcr and filter_pcr_picard can't both be true at the same time! Set one of them false in the config file"
     }
     else if (params.filter_pcr_picard){
-        SAMTOOLS_SORT(
-            BOWTIE2_ALIGNMENT.out.bam
+        FILTER_PCR_DUP(
+            BOWTIE2_ALIGNMENT.out.bam,
+            fasta,
+            index
         )
-
-
-        PICARD_MARKDUPLICATES(
-            SAMTOOLS_SORT.out.bam,
-            fasta.collect(),
-            index.collect()
-        )
-
-        SAMTOOLS_SORT_N(
-            PICARD_MARKDUPLICATES.out.bam
-        )
-
-        SAMTOOLS_SORT_N.out.bam.set{ ch_bam }
-
-        FILTER_PAIR(
-        ch_bam.combine(ch_bam)
-        .map {
-            meta1, bam1, meta2, bam2 ->
-                meta1.id == meta2.id && meta1.chunk == meta2.chunk && meta1.mates == "R1" && meta2.mates == "R2" ? [ meta1,  bam1,  meta2, bam2 ] : null
-        })
-
-        FILTER_PAIR.out.bam.set{ new_ch_bam }
-
+        FILTER_PCR_DUP.out.bam.set{ new_ch_bam }
     }
     else {