hotfix for document start and end markers