handle weirdly placed newlines