Fix bug with the buffer.