patched classes to avoid Nagle's algorithm