Update buffer.