fixed small array access bug (from_json())