Replace trailing whitespace