Fix bug. counter increment in TestTCP should be at end of function.