fix io.ReadWriter