Various TCP fixes