fix the crash of my read from writer patch