auto remove trailing whitespaces