Bug in getMatchHistory where the resulting JSON file has size 1 and creates an infinite loop