fix output buffers