fixes getSelected method