better handling of extra lines, fixes #1