diff --git a/src/hb-buffer-private.hh b/src/hb-buffer-private.hh
index 4b1ff12e6987a136ceee072b7df7f2a61dca8af2..2b063b70aea58bf68cae730b519cdbad0ef0698b 100644
--- a/src/hb-buffer-private.hh
+++ b/src/hb-buffer-private.hh
@@ -94,8 +94,6 @@ struct _hb_buffer_t {
 
   /* Buffer contents */
 
-  unsigned int allocated; /* Length of allocated arrays */
-
   hb_bool_t have_output; /* Whether we have an output buffer going on */
   hb_bool_t have_positions; /* Whether we have positions */
   hb_bool_t in_error; /* Allocation failed */
@@ -104,14 +102,13 @@ struct _hb_buffer_t {
   unsigned int len; /* Length of ->info and ->pos arrays */
   unsigned int out_len; /* Length of ->out array if have_output */
 
+  unsigned int serial;
+
+  unsigned int allocated; /* Length of allocated arrays */
   hb_glyph_info_t     *info;
   hb_glyph_info_t     *out_info;
   hb_glyph_position_t *pos;
 
-  /* Other stuff */
-
-  unsigned int serial;
-
 
   /* Methods */
   inline unsigned int backtrack_len (void) const
diff --git a/src/hb-buffer.cc b/src/hb-buffer.cc
index 4020d2ce606a1f3dc8f3bd3ea7c7685361ed995f..b71aa57f66dccde13cfe4182805059efaa79acaf 100644
--- a/src/hb-buffer.cc
+++ b/src/hb-buffer.cc
@@ -37,7 +37,12 @@ HB_BEGIN_DECLS
 static hb_buffer_t _hb_buffer_nil = {
   HB_REFERENCE_COUNT_INVALID, /* ref_count */
 
-  &_hb_unicode_funcs_nil  /* unicode */
+  &_hb_unicode_funcs_nil,  /* unicode */
+  {
+    HB_DIRECTION_INVALID,
+    HB_SCRIPT_INVALID,
+    NULL,
+  },
 };
 
 /* Here is how the buffer works internally:
@@ -138,7 +143,7 @@ hb_buffer_create (unsigned int pre_alloc_size)
   if (pre_alloc_size)
     _hb_buffer_ensure (buffer, pre_alloc_size);
 
-  buffer->unicode = &_hb_unicode_funcs_nil;
+  hb_buffer_reset (buffer);
 
   return buffer;
 }
@@ -231,19 +236,22 @@ hb_buffer_get_language (hb_buffer_t *buffer)
 void
 hb_buffer_reset (hb_buffer_t *buffer)
 {
+  hb_unicode_funcs_destroy (buffer->unicode);
+  buffer->unicode = _hb_buffer_nil.unicode;
+
+  buffer->props = _hb_buffer_nil.props;
+
   buffer->have_output = FALSE;
   buffer->have_positions = FALSE;
   buffer->in_error = FALSE;
+
+  buffer->i = 0;
   buffer->len = 0;
   buffer->out_len = 0;
-  buffer->i = 0;
-  buffer->out_info = buffer->info;
-  buffer->serial = 0;
 
-  buffer->props = _hb_buffer_nil.props;
+  buffer->serial = 0;
 
-  hb_unicode_funcs_destroy (buffer->unicode);
-  buffer->unicode = _hb_buffer_nil.unicode;
+  buffer->out_info = buffer->info;
 }
 
 hb_bool_t
diff --git a/src/hb-view.c b/src/hb-view.c
index 87d9b3087454b8c56bc88eb68f49279a8e81de14..d7e41fdcec5205b82ba41060360d39fede6024c5 100644
--- a/src/hb-view.c
+++ b/src/hb-view.c
@@ -355,10 +355,8 @@ _hb_cr_text_glyphs (cairo_t *cr,
   hb_buffer_add_utf8 (hb_buffer, text, len, 0, len);
   if (script)
     hb_buffer_set_script (hb_buffer, hb_script_from_string (script));
-  else
-    hb_buffer_set_script (hb_buffer, HB_SCRIPT_INVALID);
-  hb_buffer_set_direction (hb_buffer, HB_DIRECTION_INVALID);
-  hb_buffer_set_language (hb_buffer, hb_language_from_string (language));
+  if (language)
+    hb_buffer_set_language (hb_buffer, hb_language_from_string (language));
 
   hb_shape (hb_font, hb_face, hb_buffer, features, num_features);
 
diff --git a/test/test-buffer.c b/test/test-buffer.c
index 4316f171c6b6882de2674d22b2e596df93cb8cf3..dad2eacc1f7fe4f2f445d4b402e5b2644657e4f9 100644
--- a/test/test-buffer.c
+++ b/test/test-buffer.c
@@ -100,8 +100,8 @@ test_buffer_properties (Fixture *fixture, gconstpointer user_data)
 {
   /* TODO check unicode_funcs */
 
-  g_assert (hb_buffer_get_direction (fixture->b) == HB_DIRECTION_LTR);
-  g_assert (hb_buffer_get_script (fixture->b) == HB_SCRIPT_COMMON);
+  g_assert (hb_buffer_get_direction (fixture->b) == HB_DIRECTION_INVALID);
+  g_assert (hb_buffer_get_script (fixture->b) == HB_SCRIPT_INVALID);
   g_assert (hb_buffer_get_language (fixture->b) == NULL);
 
   hb_buffer_set_direction (fixture->b, HB_DIRECTION_RTL);