Protect against some JSON encoding issues ?