fix imm bug