Added code for reverting the previous WiFi setting.