fix crashing bug in pick_among_best