modify master version before publishing the document