fix double-encoding