Fixed exception

need to close the socket :)