fix not initialized buffer