fix a bug in Dictionary