handle infinity as best_weight correctly