fix some ending newlines