corrected a bug in the JSON parser