CommitCmd: fix NoSuchElementException