remove useless trailing whitespaces