Fixed a bug in the TCPMessageHandler.