Fix problem with reading invalid key form the dictionary

I did in the same way Ian did for other files, but we have to find a better way to fix it.