Fix failure if nothing is selected