Set Mode in a logical order
Merge pull request #1028 from rschellhorn/mode-is-ordered

Set Mode in a logical order