fix session operation