fix str and unicode issue