Modify to properly work with Server Session state.