what is the cost of calling command_mode if already in command_mode? If there is a cost, perhaps this check should be inside the command_mode method so it never happens.