Bug fix in wifi detection.