remove trailing whitespaces.