Restore previous state.