--- a/gtk/gtkcomposetable.c
+++ b/gtk/gtkcomposetable.c
@@ -697,7 +697,7 @@
   retval = g_new0 (GtkComposeTable, 1);
   retval->data = gtk_compose_seqs;
   retval->max_seq_len = max_seq_len;
-  retval->n_seqs = length;
+  retval->n_seqs = n_seqs;
   retval->id = hash;
 
   g_free (contents);
