diff --git a/twsproxy/__init__.py b/twsproxy/__init__.py
index 115e87330297dcb405440b0509f86eadc2a2b2e4..548ff6eeea721d65d5c0d95743e4eaf3a1dd3031 100644
--- a/twsproxy/__init__.py
+++ b/twsproxy/__init__.py
@@ -153,7 +153,7 @@ class TWSProxy(threading.Thread):
         name = threading.current_thread().name
         while not closed:
             r,w,e = select.select([src],[],[],TWSProxy.TIMEOUT)
-            if len(r) > 0:
+            if len(r) > 0 and (not (type(r) == list)):
                 buff = None
                 msglength = -1
                 try:
@@ -172,7 +172,6 @@ class TWSProxy(threading.Thread):
                     TWSProxy.reliablesend(dest,buff,msglength)
                 if msglength == 0:
                     logger.debug('socket shutdown, fh ready to read but 0 bytes returned')
-                    logger.debug(r[0],src)
                     #dest.send(buff)
                     dest.shutdown(shuttype)
                     initshutdown.set()