Fix a session bug