fix some bugs for Str