fixed strtrim function