Fixed double encoding of entities