Fix whitespace trimming