Fix case where bigger integer (n) is multiple of smaller integer (fx) leading to an infinite loop