Fix to copy all mappings, encodeURIComponent for setData