remove trailing whitespaces