diff --git a/doc/reference/xml/index.xml b/doc/reference/xml/index.xml
deleted file mode 100644
index e69de29..0000000
diff --git a/libseed/seed-engine.c b/libseed/seed-engine.c
index c393727..27855a5 100644
--- a/libseed/seed-engine.c
+++ b/libseed/seed-engine.c
@@ -549,7 +549,7 @@ seed_gobject_method_invoked (JSContextRef ctx,
               if (is_caller_allocates) 
                 {
                   gsize size = g_struct_info_get_size ( (GIStructInfo *) iface_info) ;
-                  out_args[n_out_args].v_pointer = g_malloc0 (size);
+                  out_args[n_out_args].v_pointer = g_malloc0 (size + 1);
                   out_values[n_out_args].v_pointer = out_args[n_out_args].v_pointer;
                 }
 #endif
@@ -647,7 +647,7 @@ seed_gobject_method_invoked (JSContextRef ctx,
 	  if (is_caller_allocates) 
 	    {
 	      gsize size = g_struct_info_get_size ( (GIStructInfo *) iface_info) ;
-	      out_args[n_out_args].v_pointer = g_malloc0 (size);
+	      out_args[n_out_args].v_pointer = g_malloc0 (size + 1);
  	      out_values[n_out_args].v_pointer = out_args[n_out_args].v_pointer;
 	    }
 #endif
diff --git a/libseed/seed-structs.c b/libseed/seed-structs.c
index f34c3fc..d2f9416 100644
--- a/libseed/seed-structs.c
+++ b/libseed/seed-structs.c
@@ -738,7 +738,7 @@ seed_construct_struct_type_with_parameters (JSContextRef ctx,
 		  g_base_info_get_name (info));
       g_assert(size);
     }
-  object = g_slice_alloc0 (size);
+  object = g_slice_alloc0 (size+1);
 
   SEED_NOTE (CONSTRUCTION,
 	     "Constructing struct/union of type: %s. Size: %zu \n",
@@ -750,7 +750,7 @@ seed_construct_struct_type_with_parameters (JSContextRef ctx,
     ret = seed_make_union (ctx, object, info);
 
   seed_pointer_set_free (ctx, ret, TRUE);
-  seed_pointer_set_slice (ctx, ret, TRUE, size);
+  seed_pointer_set_slice (ctx, ret, TRUE, size+1);
 
   if (!parameters)
     return ret;
