fix session problems