Fix new trim function.