fix unicode error in cleaner way