fixing bad keys for hashes