Changed self to this in statemanager