fix whitespace trimming