Fix a segmentation fault that happens when there isn't blank text after a key.