diff --git a/src/text.c b/src/text.c
index df2d35a64013343e516c96b3cdb31a7cbf8fce9e..d7743bdce9f5c68255931a9250d6d9170091ee49 100644
--- a/src/text.c
+++ b/src/text.c
@@ -988,7 +988,7 @@ filestruct *backup_lines(filestruct *first_line, size_t par_len)
     /* Move the paragraph from the current buffer's filestruct to the
      * justify buffer. */
     move_to_filestruct(&jusbuffer, &jusbottom, top, 0, bot,
-	(bot == filebot) ? strlen(bot->data) : 0);
+	(bot == openfile->filebot) ? strlen(bot->data) : 0);
 
     /* Copy the paragraph back to the current buffer's filestruct from
      * the justify buffer. */