corrected some bugs on the netcat test