fixed a session bug