diff --git a/liblinenoise/linenoise.c b/liblinenoise/linenoise.c
index ab57ae6..4f6775c 100644
--- a/liblinenoise/linenoise.c
+++ b/liblinenoise/linenoise.c
@@ -138,8 +138,8 @@
      * We want read to return every single byte, without timeout. */
     raw.c_cc[VMIN] = 1; raw.c_cc[VTIME] = 0; /* 1 byte, no timer */
 
-    /* put terminal in raw mode after flushing */
-    if (tcsetattr(fd,TCSAFLUSH,&raw) < 0) goto fatal;
+    /* put terminal in raw mode */
+    if (tcsetattr(fd,TCSADRAIN,&raw) < 0) goto fatal;
     rawmode = 1;
     return 0;
 
@@ -150,7 +150,7 @@
 
 static void disableRawMode(int fd) {
     /* Don't even check the return value as it's too late. */
-    if (rawmode && tcsetattr(fd,TCSAFLUSH,&orig_termios) != -1)
+    if (rawmode && tcsetattr(fd,TCSADRAIN,&orig_termios) != -1)
         rawmode = 0;
 }
 
@@ -163,16 +163,30 @@
 static int getColumns(void) {
     struct winsize ws;
 
-    if (ioctl(1, TIOCGWINSZ, &ws) == -1) return 80;
+    if (ioctl(1, TIOCGWINSZ, &ws) == -1) return 4096;
     if (ws.ws_col == 0) {
-        return 80;
+        return 4096;
     }
     return ws.ws_col;
 }
 
+static int effectiveLen(const char* prompt) {
+    int col = 0;
+    char c;
+    // TODO: Handle escape sequences.
+    while ( (c = *prompt++) != 0 ) {
+        if (c == '\n') {
+            col = 0;
+        } else {
+            col++;
+        }
+    }
+    return col;
+}
+
 static void refreshLine(int fd, const char *prompt, char *buf, size_t len, size_t pos, size_t cols) {
     char seq[64];
-    size_t plen = strlen(prompt);
+    size_t plen = effectiveLen(prompt);
     
     while((plen+pos) >= cols) {
         buf++;
diff --git a/rootdir/init.rc b/rootdir/init.rc
index 925347d..b0aa5f2 100644
--- a/rootdir/init.rc
+++ b/rootdir/init.rc
@@ -41,7 +41,7 @@
 # Create cgroup mount points for process groups
     mkdir /dev/cpuctl
     mount cgroup none /dev/cpuctl cpu
-    chown sytem system /dev/cpuctl
+    chown system system /dev/cpuctl
     chown system system /dev/cpuctl/tasks
     chmod 0777 /dev/cpuctl/tasks
     write /dev/cpuctl/cpu.shares 1024
diff --git a/sh/input.c b/sh/input.c
index bfb80f4..056ee8b 100644
--- a/sh/input.c
+++ b/sh/input.c
@@ -175,6 +175,9 @@
 	return pgetc_macro();
 }
 
+int in_interactive_mode() {
+    return parsefile != NULL && parsefile->fd == 0;
+}
 
 static int
 preadfd(void)
diff --git a/sh/input.h b/sh/input.h
index a9d3a12..99c1b77 100644
--- a/sh/input.h
+++ b/sh/input.h
@@ -46,6 +46,7 @@
 extern char *parsenextc;	/* next character in input buffer */
 extern int init_editline;	/* 0 == not setup, 1 == OK, -1 == failed */
 
+int in_interactive_mode();
 char *pfgets(char *, int);
 int pgetc(void);
 int preadbuffer(void);
diff --git a/sh/parser.c b/sh/parser.c
index d956375..faf0268 100644
--- a/sh/parser.c
+++ b/sh/parser.c
@@ -1629,9 +1629,9 @@
 	if (!el)
 #endif
 #ifdef WITH_LINENOISE
-#else
-		out2str(getprompt(NULL));
+        if (! in_interactive_mode() )
 #endif
+		out2str(getprompt(NULL));
 }
 
 /*
