fix dictionary corruption