Cannot break loop over cores using do parallel in R

I am trying to break this loop over multiple cores. For each loop i is sequentially changed from 1 to 16. At the moment it isn’t breaking over the cores. Thank you for your help!

cl <- makeCluster((detectCores()-2))
registerDoParallel(cl)                 

clusters <- 1:16

foreach(i = clusters, .packages = c("tidyverse","magrittr")) %dopar% {

Encode.all.cl <-  Encode.all.t %>%
filter(cluster == i) %>%
select(-cluster)

Encode.all.cl.2 <- data.frame(t(Encode.all.cl)) %>%
set_rownames(colnames(Encode.all.cl)) %>%
set_colnames(rownames(Encode.all.cl))


Encode.all.cl.3 <- Encode.all.cl.2 %>%
mutate(.,count = rowSums(Encode.all.cl.2)) %>%
set_rownames(colnames(Encode.all.cl)) %>%
set_colnames(c(rownames(Encode.all.cl), "count")) %>%
filter(., count >= ncol(Encode.all.cl.2)*0.9) %>% #common in 90% of peaks
rownames_to_column(var = "Peak") %>%
dplyr::select(Peak) %>%
set_colnames("Cluster")

consensusPeaks((i)) <- Encode.all.cl.3

print(paste0("Finished cluster ", i))

}

stopCluster(cl)