fix bug in set_sampled_topics