remove some trailing whitespaces