Made buffers flush correctly.