Fixed trim newline bugs.