Minor bugfix

Same references are added to attributes of images/anchors thus making it
invalid