Fixed bug in get_mode_involvment function.