Fixed up TCP close connection bug