diff --git a/ChangeLog b/ChangeLog
index e07551219625e2308848a93167ad12eacd0ced62..cc85b52dda1fd9fc7d0af7ef5a34c189c2e8a82c 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -13,6 +13,9 @@ CVS code -
 	- Stat full_path, not path (Steven Kneizys).
   read_file()
 	- Abort if we read a file of 0 lines (num_lines == 0), fixes BUG #70.
+	- Reverse tests to stop segfault on editing a new file of 0 
+	  lines (David Benbennick)
+	- Change input var to one char instead of array (David Benbennick).
 - nano.c:
   do_justify()
 	- More fixes for indented justify (David Benbennick).
diff --git a/files.c b/files.c
index 527117b21874d315df3264b719e69bf2c30cec6b..ee07078d95df076404fcabb14a8766d9edcf36f0 100644
--- a/files.c
+++ b/files.c
@@ -115,6 +115,8 @@ int read_byte(int fd, char *filename, char *input)
 	    resetty();
 	    endwin();
 	    perror(filename);
+	    total_refresh();
+	    return -1;
 	}
 	if (!size)
 	    return 0;
@@ -175,7 +177,7 @@ int read_file(int fd, char *filename, int quiet)
 {
     long size;
     int num_lines = 0;
-    char input[2];		/* buffer */
+    char input;		/* current input character */
     char *buf;
     long i = 0, bufx = 128;
     filestruct *fileptr = current, *tmp = NULL;
@@ -192,19 +194,18 @@ int read_file(int fd, char *filename, int quiet)
 	current = fileage;
 	line1ins = 1;
     }
-    input[1] = 0;
     /* Read the entire file into file struct */
-    while ((size = read_byte(fd, filename, input)) > 0) {
+    while ((size = read_byte(fd, filename, &input)) > 0) {
 
-	if (input[0] == '\n') {
+	if (input == '\n') {
 	    fileptr = read_line(buf, fileptr, &line1ins);
 	    num_lines++;
 	    buf[0] = 0;
 	    i = 0;
 #ifndef NANO_SMALL
-	 } else if (!ISSET(NO_CONVERT) && input[0] >= 0 && input[0] <= 31 
-			&& input[0] != '\t' && input[0] != '\r'
-			&& input[0] != '\n') 
+	 } else if (!ISSET(NO_CONVERT) && input >= 0 && input <= 31 
+			&& input != '\t' && input != '\r'
+			&& input != '\n') 
 	    /* If the file has binary chars in it, don't stupidly
 		assume it's a DOS or Mac formatted file! */
 	    SET(NO_CONVERT);
@@ -215,7 +216,7 @@ int read_file(int fd, char *filename, int quiet)
 	    fileformat = 2;
 	    fileptr = read_line(buf, fileptr, &line1ins);
 	    num_lines++;
-	    buf[0] = input[0];
+	    buf[0] = input;
 	    buf[1] = 0;
 	    i = 1;
 #endif
@@ -229,7 +230,7 @@ int read_file(int fd, char *filename, int quiet)
 		buf = nrealloc(buf, bufx + 128);
 		bufx += 128;
 	    }
-	    buf[i] = input[0];
+	    buf[i] = input;
 	    buf[i + 1] = 0;
 	    i++;
 	}
@@ -243,13 +244,6 @@ int read_file(int fd, char *filename, int quiet)
 	buf[0] = 0;
     }
 
-    /* Did we try to insert a file of 0 bytes? */
-    if (num_lines == 0)
-    {
-	statusbar(_("Read %d lines"), 0);
-	return 1;
-    }
-
     /* Did we even GET a file if we don't already have one? */
     if (totsize == 0 || fileptr == NULL) {
 	new_file();
@@ -257,6 +251,13 @@ int read_file(int fd, char *filename, int quiet)
 	return 1;
     }
 
+    /* Did we try to insert a file of 0 bytes? */
+    if (num_lines == 0)
+    {
+	statusbar(_("Read %d lines"), 0);
+	return 1;
+    }
+
     if (current != NULL) {
 	fileptr->next = current;
 	current->prev = fileptr;
@@ -310,7 +311,7 @@ int open_pipe(char *command)
 	dup2(fd[1], fileno(stderr));
 	/* If execl() returns at all, there was an error. */
       
-	execl("/bin/sh","/bin/sh","-c",command,0);
+	execl("/bin/sh","sh","-c",command,0);
 	exit(0);
     }
 
diff --git a/nano.c b/nano.c
index 05ea73009ec4966ec40c9c0644b02da30d67964a..cfb666f358a1434e1771863deeb183c21f78fdd6 100644
--- a/nano.c
+++ b/nano.c
@@ -369,6 +369,7 @@ int renumber_all(void)
     filestruct *temp;
     int i = 1;
 
+    assert(fileage==NULL || fileage!=fileage->next);
     for (temp = fileage; temp != NULL; temp = temp->next) {
 	temp->lineno = i++;
     }
@@ -384,6 +385,7 @@ int renumber(filestruct * fileptr)
 	renumber_all();
 	return 0;
     }
+    assert(fileptr==NULL || fileptr!=fileptr->next);
     for (temp = fileptr; temp != NULL; temp = temp->next) {
 	if (temp->prev != NULL)
 	    temp->lineno = temp->prev->lineno + 1;