First fix for bad connection 

On a very bad connection this error can occur: "attempt to index field
'sock' (a nil value)"

Should fix issue #5.