fix a bug when invoking trim() in number type