Fix a bug with JSON responses.