Fixed issue when annotating last annotatable element in document

Before, the last annotatable element in a document didn't get annotated. I fixed that.
At the moment I'm unsure which element to select as the one to annotate, this is still an issue.