fix a session bug