Fix the crash about run the same command twice.