Fix crash when using "Connect to hidden network"