fixes in WiFi code