address strange sock==nil case