fixed more bugs in tcpreceiver