Fixed some issues with the combining of lines.