Some changes according to the session state handling