fix read/write timeout