fix dictionary bug