fix session_expired bug