possible fix to a JSON-decoding bug with some rare inputs