Fixed bug in statepoint.py