socket closing fix?