Correct SSID encode/decode logic.