fix session count bug