Final fix for reconnecting to socket
Removed debug print lines