additional fix to _to_unicode