fixed tcp bug