Reorganize setSelected()