fix negative imm range bug