diff --git a/src/utils.c b/src/utils.c
index decad9e96897684d80da3d33285394eddd61398e..5a2fbaed518654cc0613b3b536847276301d956d 100644
--- a/src/utils.c
+++ b/src/utils.c
@@ -540,7 +540,7 @@ void get_region(const filestruct **top, const filestruct **bot)
 
     mark_order(top, &top_x, bot, &bot_x, NULL);
 
-    if (bot_x == 0)
+    if (bot_x == 0 && *bot != *top)
 	*bot = (*bot)->prev;
 }