Added assertion in nextState method for catching bugs quicker
Fixed persisted policy code