fix indexing in command line