fixed a bug in loading dictionaries