more fix of dealing with str and unicdoe of Issue #761