Fix bug in list_sessions for multiple types of sessions