diff --git a/ChangeLog b/ChangeLog
index 43749f6830bd962d54310b493e89abf20360017d..e9e249339789e473821cba97cda9feb54266b934 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -48,8 +48,8 @@ CVS code -
 	  file.  Changes to cut_line(), cut_to_eol(), do_page_up(),
 	  do_page_down(), do_para_end(), do_next_word(), do_prev_word(),
 	  do_up(), do_down(), do_scroll_down(), do_right(), do_mouse(),
-	  do_gotolinecolumn(), do_delete(), begpar(), and
-	  find_paragraph(). (DLR)
+	  do_gotolinecolumn(), do_delete(), begpar(), find_paragraph(),
+	  and do_justify(). (DLR)
 	- Add new -L/--nonewlines command line option, and new
 	  "nonewlines" rcfile option, to control whether nano adds
 	  magiclines to the ends of files.  Changes to read_file(),
diff --git a/src/text.c b/src/text.c
index 6cea181299d4ac6bccbc0a8fe7e39bace566ce49..72931e5b6a416445bc48badcd1f40d86acbacfaa 100644
--- a/src/text.c
+++ b/src/text.c
@@ -1409,7 +1409,7 @@ void do_justify(bool full_justify)
      * something). */
     last_par_line = openfile->current;
     if (first_par_line != NULL) {
-	if (first_par_line->prev == NULL)
+	if (first_par_line == openfile->fileage)
 	    openfile->fileage = first_par_line;
 	renumber(first_par_line);
     }