Fixed connection problem with TCP server