fix session library bug