diff --git a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
index f40d822b6bff1e72d1316a55801e8b261605f60c..526fc17083aa518153b8f2cfd6ceb9149e1acafe 100644
--- a/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
+++ b/openair2/LAYER2/NR_MAC_COMMON/nr_mac_common.c
@@ -1151,8 +1151,9 @@ uint8_t compute_nr_root_seq(NR_RACH_ConfigCommon_t *rach_config,
     if (NCS == 0) return nb_preambles;
     else {
       r = L_ra/NCS;
-      printf(" found_sequences %u\n", (nb_preambles/r));
-      return (nb_preambles/r);
+      found_sequences = (nb_preambles/r) + (nb_preambles%r!=0); //ceil(nb_preambles/r) 
+      printf(" found_sequences %u\n", found_sequences);
+      return (found_sequences);
     }
   }
   else{