TCP Implementation not working