fixed copy-on-write for shaped json