clear buffer before Publish()