Don't index into array when cmds is 0