cleanup newline_fix function