Moved mode switching to command also if command not found.

This make the mode switching more unique. If command_run is called, this will
switch to the right mode, independent if the command exists or could be run or
not.