fix session comparison