Remove trailing newlines