Update main.cpp

fixed remote connection problem