Fix problems in reusing sbuf.