remove erroneous newlines