Fixes replacing newlines.