remove some trailing newlines