Fixed the issues of Cannot save session info.

Dai, Please test your code!!!