Fix save page state bug.