fix segfault typping Enter when nbentry = 0