Bugfix where state accidentally reset (#58)

We were accidentally resetting some tracking variables if large datasets were
passed in.

/cc @scraperdragon