Bug fixes in RestoreAllStates test plan