fix dictionary-keys bug