Fixed port bug for tcp models