Avoid multiple appearance of last line on multi-lined text. Fixes issue #2