Fixed bug in statepoint.py for multiple generations per batch.