Fixed Some bugs when session starts