diff --git a/src/common/hattrie/hat-trie.c b/src/common/hattrie/hat-trie.c
index d6a3de7548954c1176a4dfde02fec1add384cb73..d219ac39902c034eb0a7eb1c894fae8c993180db 100644
--- a/src/common/hattrie/hat-trie.c
+++ b/src/common/hattrie/hat-trie.c
@@ -645,6 +645,7 @@ value_t* hattrie_get(hattrie_t* T, const char* key, size_t len)
 
     /* attempt to fit new element and split if it doesn't fit */
     while (val == NULL) {
+		assert(len > 0);
         size_t m_old = node.b->weight;
         if (*node.flag & NODE_TYPE_PURE_BUCKET) {
             val = hhash_map(node.b, key + 1, len - 1, HHASH_INSERT);