Too many square brackets in the history JSON