Fix for write_large_flush: clear out the read buffer to let the write buffer through