fix session bug