Fixed bug, crashed on TCP connection