fix bug #4659: trim white spaces