diff --git a/src/emote-tk.R b/src/emote-tk.R
index 0701a199b3ba811d69d61fd92a116678ce1d44c6..d561a3f3f81328c155bf857836ec258395dae2c2 100644
--- a/src/emote-tk.R
+++ b/src/emote-tk.R
@@ -1212,14 +1212,16 @@ EMOTE_parse_region = function(region,
                               count_table){
   
   # Start region
+  tb = tibble(position = region$start_lower_bound:region$start_upper_bound, strand = region$strand)
   count_table_region_start = count_table %>% 
-    filter(strand == region$strand & position>=region$start_lower_bound & position<=region$start_upper_bound) %>% 
+    inner_join(tb, by = c("position","strand")) %>% 
     mutate(reg = "start") %>% 
     group_by(barcode) %>% mutate(tot = sum(count))
   
   # STOP region
+  tb = tibble(position = region$stop_lower_bound:region$stop_upper_bound, strand = region$strand)
   count_table_region_end = count_table %>% 
-    filter(strand == region$strand & position>=region$stop_lower_bound & position<=region$stop_upper_bound) %>% 
+    inner_join(tb, by = c("position","strand")) %>% 
     mutate(reg = "stop")  %>% 
     group_by(barcode) %>% mutate(tot = sum(count))
 
@@ -1427,4 +1429,4 @@ EMOTE_frame_preference = function(count_table = NULL,
       inner_join(annot, by = c("start","strand"))
   }
   return(frame)
-}
\ No newline at end of file
+}