Fix division-by-zero error in mean inverse rank calculation