fix toJSON() copy

I expect `.toJSON()` to return a copy, so I can mess with data without changing the real model.

We might use a more efficient cloning algorithm, I'm not sure where this method is used.