Fixed a type in get_ir_distance