Fixing issues with tcp