Make sure mode-switch is hidden when mode is not switchable
Tidy for consistent coding style