set wbuf correctly