Fix a JSON sequence encode bug