getoptimizedselection fixed