Fix multibyte trimming