bugfix for tcp (#618)
Merge remote-tracking branch 'github/master' into comp_test