tcp client fixes and updated Makefile