bug fix, import socket in main.py