Fixed issue where the key value would cause segfault