Restoring previous state.