fixed newline issue when printing individual lines.