Fixing some systemId encoding problems.