Fix the lack of a logic check against the set flag. We should add the mode to the list when set and remove it when unsetting.
Fix merge conflict from remote.