fixed bug in ``_join_lines``