Merge pull request #1858 from nabinhait/v4-hotfix

with_doc issue fixes