Small fixes on tcp