Replace add_data with add_buffer.