fix commandIndex should add 1 in the exeCommand function