Fixed bugs in dictionaries