Fix for selected being NULL from set_value