Small changes to the IR range function