fix dict bug