Using selectedOpetions instead of selectedIndex for calculating the selected item