fix broken encoding