fix session bug in framework