History panel: fix dataset count off by one error