Added missing index argument to AddCommand