fix writecloser error