Fix save session issue