fixing the tcp messaging