Fix segfault on Key Not Found error.