fix c buffers