don't append empty strings, don't break short substrings