Connector: improve get_mode(string)