Imporove buffer#build