Fixed a typo in the IR distances function.