Fixed problem with wifi state, and recognizing SSID disconnected wifi