Update main.py

Hotfix for wireless device automatic detection bug.