Fix multiple closing xml tags at end of a string

Fixes #15