before restart