Fixed TCP bug