Merge pull request #234 from KurtStam/master

fixing assertion
fixed a couple of bugs in the visitors related to ExtendedDocument
Merge pull request #235 from EricWittmann/sramp-extensionDoc-bugfixes

fixed a couple of bugs in the visitors related to ExtendedDocument