Removed debug, added check for 0 length string
Merge branch 'master' into xep-0223