fixes. works with tcp, too