Fix encoding fail