automagically remove trailing whitespaces