fix dictionary print bug