minor hardening against JSON issues