minor addition to session_mode()