Index: src/xplcommon/win32/LocalAcceptor.cc
===================================================================
--- src/xplcommon/win32/LocalAcceptor.cc	(revision 22)
+++ src/xplcommon/win32/LocalAcceptor.cc	(revision 23)
@@ -40,5 +40,4 @@
 LocalAcceptor::LocalAcceptor(LocalServerSocketBase* socket, const char* name) :
     Completer(socket),
-    socket(*socket),
     accepted(false)
 {
@@ -58,4 +57,5 @@
     }
 
+    LocalServerSocketBase& socket = getServerSocket();
     if (!socket.createNamedPipe(path)) {
         return false;
Index: src/xplcommon/win32/LocalAcceptor.h
===================================================================
--- src/xplcommon/win32/LocalAcceptor.h	(revision 22)
+++ src/xplcommon/win32/LocalAcceptor.h	(revision 23)
@@ -52,9 +52,4 @@
 private:
     /**
-     * The local server socket for which we are accepting connections.
-     */
-    LocalServerSocketBase& socket;
-
-    /**
      * The path of the pipe to accept.
      */
@@ -71,4 +66,12 @@
      */
     LocalAcceptor(LocalServerSocketBase* socket, const char* name);
+
+    /**
+     * Get the socket.
+     *
+     * It returns the overlappable from the Completer part, knowing
+     * that it must be a LocalServerSocketBase.
+     */
+    LocalServerSocketBase& getServerSocket() const;
 
 public:
@@ -130,4 +133,11 @@
 //------------------------------------------------------------------------------
 
+inline LocalServerSocketBase& LocalAcceptor::getServerSocket() const
+{
+    return static_cast<LocalServerSocketBase&>(overlappable);
+}
+
+//------------------------------------------------------------------------------
+
 inline LocalSocket* LocalAcceptor::getSocket(Waiter* waiter,
                                              size_t readingCapacity,
@@ -136,9 +146,10 @@
     if (!accepted) return 0;
 
-    LocalSocket* s = new LocalSocket(waiter, socket.releaseHandle(),
+    LocalSocket* s = new LocalSocket(waiter, getServerSocket().releaseHandle(),
                                      readingCapacity, writingCapacity);
     accepted = false;
     return s;
 }
+
 //------------------------------------------------------------------------------
 
@@ -146,5 +157,6 @@
                                              size_t writingCapacity)
 {
-    return getSocket(socket.waiter, readingCapacity, writingCapacity);
+    return getSocket(getServerSocket().waiter,
+                     readingCapacity, writingCapacity);
 }
 
@@ -153,5 +165,5 @@
 inline const ::xplcommon::Failable& LocalAcceptor::getFailable() const
 {
-    return socket;
+    return overlappable;
 }
 
@@ -160,5 +172,5 @@
 inline ::xplcommon::Failable& LocalAcceptor::getFailable()
 {
-    return socket;
+    return overlappable;
 }
 
Index: src/xplcommon/win32/ReadingBuffer.cc
===================================================================
--- src/xplcommon/win32/ReadingBuffer.cc	(revision 22)
+++ src/xplcommon/win32/ReadingBuffer.cc	(revision 23)
@@ -53,4 +53,5 @@
     }
 
+    BufferedStream& stream = getStream();
     ssize_t numRead = stream.read(getData(), getCapacity(), overlapped);
     if (numRead<0) {
Index: src/xplcommon/win32/StreamBuffer.h
===================================================================
--- src/xplcommon/win32/StreamBuffer.h	(revision 21)
+++ src/xplcommon/win32/StreamBuffer.h	(revision 23)
@@ -52,14 +52,16 @@
 protected:
     /**
-     * The buffered stream this stream buffer belongs to.
-     */
-    BufferedStream& stream;
-
-protected:
-    /**
      * Construct the stream buffer with the given capacity and for the
      * given stream.
      */
     StreamBuffer(size_t capacity, BufferedStream* stream);
+
+    /**
+     * Get the stream.
+     *
+     * This just casts the overlappable of the Completer part knowing
+     * that it must be a BufferedStream
+     */
+    BufferedStream& getStream() const;
 
 private:
@@ -83,7 +85,13 @@
 inline StreamBuffer::StreamBuffer(size_t capacity, BufferedStream* stream) :
     Buffer(capacity),
-    Completer(stream),
-    stream(*stream)
+    Completer(stream)
 {
+}
+
+//------------------------------------------------------------------------------
+
+inline BufferedStream& StreamBuffer::getStream() const
+{
+    return static_cast<BufferedStream&>(overlappable);
 }
 
@@ -92,5 +100,5 @@
 inline const ::xplcommon::Failable& StreamBuffer::getFailable() const
 {
-    return stream;
+    return overlappable;
 }
 
@@ -99,5 +107,5 @@
 inline ::xplcommon::Failable& StreamBuffer::getFailable()
 {
-    return stream;
+    return overlappable;
 }
 
Index: src/xplcommon/win32/WritingBuffer.cc
===================================================================
--- src/xplcommon/win32/WritingBuffer.cc	(revision 22)
+++ src/xplcommon/win32/WritingBuffer.cc	(revision 23)
@@ -51,4 +51,5 @@
     }
 
+    BufferedStream& stream = getStream();
     result = stream.write(getData(), getLength(), overlapped);
     if (result) {
