Fixed trimming of space characters