fix removing ending commans in xwikiDoctoLinkedMap