Fix a KeyError?

I can't reproduce it on my computer, but I think this will help.