Fixed bug with trying to iterate over the selected_values