Handle trailing whitespace