fixed write_line calls