diff --git a/lib/vty.c b/lib/vty.c
index 480d34f..9f4d8fa 100644
--- a/lib/vty.c
+++ b/lib/vty.c
@@ -111,7 +111,7 @@
     {
       /* Try to write to initial buffer.  */
       va_start (args, format);
-      len = vsnprintf (buf, sizeof buf, format, args);
+      len = vsnprintf (buf, sizeof(buf), format, args);
       va_end (args);
 
       /* Initial buffer is not enough.  */
@@ -401,7 +401,41 @@
   int ret;
   vector vline;
   const char *protocolname;
+  char *cp;
 
+  /*
+   * Log non empty command lines
+   */
+  cp = buf;
+  if (cp != NULL)
+    {
+      /* Skip white spaces. */
+      while (isspace ((int) *cp) && *cp != '\0')
+        cp++;
+    }
+  if (cp != NULL && *cp != '\0')
+    {
+      unsigned i;
+      char	vty_str[VTY_BUFSIZ];
+      char        prompt_str[VTY_BUFSIZ];
+
+      /* format the base vty info */
+      snprintf(vty_str, sizeof(vty_str), "vty[??]@%s", vty->address);
+      if (vty)
+        for (i = 0; i < vector_active (vtyvec); i++)
+          if ((vty == vector_slot (vtyvec, i)))
+            {
+              snprintf(vty_str, sizeof(vty_str), "vty[%d]@%s",
+                                                 i, vty->address);
+              break;
+            }
+
+      /* format the prompt */
+      snprintf(prompt_str, sizeof(prompt_str), cmd_prompt (vty->node), vty_str);
+
+      /* now log the command */
+      zlog(NULL, LOG_NOTICE, "%s%s", prompt_str, buf);
+    }
   /* Split readline string up into the vector */
   vline = cmd_make_strvec (buf);
 
@@ -1571,7 +1605,7 @@
   erase = ((vty->status == VTY_MORE || vty->status == VTY_MORELINE));
 
   /* N.B. if width is 0, that means we don't know the window size. */
-  if ((vty->lines == 0) || (vty->width == 0))
+  if ((vty->lines == 0) || (vty->width == 0) || (vty->height == 0))
     flushrc = buffer_flush_available(vty->obuf, vty_sock);
   else if (vty->status == VTY_MORELINE)
     flushrc = buffer_flush_window(vty->obuf, vty_sock, vty->width,
